Book a Demo

Author Topic: MySQL, Datetime, DDL-Issue  (Read 6974 times)

Henrik Raböse

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
MySQL, Datetime, DDL-Issue
« on: July 08, 2016, 11:26:08 pm »
EA: 12.0.1215

In the database builder: Column "adddate", Type "Datetime". I can't change or remove the "Length" (0).



The DDL-Generator make this.
Code: [Select]
CREATE TABLE `customer`
(
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(150) NOT NULL,
`adddate` DATETIME(0) NOT NULL,
`addby` BIGINT NOT NULL,
`changedate` DATETIME(0) NOT NULL,
`changeby` BIGINT NOT NULL,
CONSTRAINT `PK_customer` PRIMARY KEY (`id`)
)


The generated code has an SQL-Error: Datatype "DATETIME" has not a length. "`adddate` DATETIME(0) NOT NULL,"



regards
Henrik


« Last Edit: July 08, 2016, 11:31:30 pm by Henrik Raböse »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: MySQL, Datetime, DDL-Issue
« Reply #1 on: July 09, 2016, 01:06:22 am »
For which database?

q.

Henrik Raböse

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: MySQL, Datetime, DDL-Issue
« Reply #2 on: July 09, 2016, 03:23:53 am »
Sorry.
But it is in the subject: MySql.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: MySQL, Datetime, DDL-Issue
« Reply #3 on: July 09, 2016, 04:28:29 am »
lol

I just tried this with MySQL and my EA does not create the number:
Code: [Select]
`date` DATETIME NULL
used release 1224. So maybe you should update?

q.

Henrik Raböse

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: MySQL, Datetime, DDL-Issue
« Reply #4 on: July 09, 2016, 06:09:59 am »
Ok, thank you for this hint.
I'll try this again with update and report my result.

regards
Henrik

ps.
There is an update to the version 1224?

pps.
I've updated to version 1230 and the DDL-code looks like good ;).
« Last Edit: July 09, 2016, 06:28:25 am by Henrik Raböse »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: MySQL, Datetime, DDL-Issue
« Reply #5 on: July 09, 2016, 06:43:51 am »
Formerly I had been on the latest release whenever possible, but I'm no longer that adventurous ;-)
But probably it's better to update to the latest version once you ran into trouble.

q.