Skip to content

Cannot add NULL timestamp field #48

Description

@afallison

The application throws an error when adding a new field using dataType 'timestamp'

Syntax error or access violation: 1067 Invalid default value for 'date'
ALTER TABLE `test` MODIFY COLUMN `date` timestamp DEFAULT NULL

I was able to make it work by manually running this query:

ALTER TABLE `test` ADD COLUMN `timeIn` timestamp NULL DEFAULT NULL

'NULL' should be added after the dataType

BEFORE:
ALTER TABLE `test` ADD COLUMN `timeIn` timestamp DEFAULT NULL

AFTER:
ALTER TABLE `test` ADD COLUMN `timeIn` timestamp NULL DEFAULT NULL

Server Info:

  • Ubuntu 14.14
  • Apache 2.4.7
  • PHP 5.5.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions