Book a Demo

Author Topic: Generate DDL for MySql or other databases  (Read 4745 times)

steltner

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Generate DDL for MySql or other databases
« on: May 09, 2006, 10:42:02 am »
I created a data model (after I imported the MySQL-Database via ODBC). All tables are marked as MySql-tables and all datatypes are defined for MySql.

When I generate the DDL script I get a wrong syntax. For example:

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('FK_tasks_tasklist') AND OBJECTPROPERTY(id, 'IsForeignKey') = 1)
ALTER TABLE tasks DROP CONSTRAINT FK_tasks_tasklist
;


This command doesn't work on MySql. I would like change the destination DDL language to the MySql syntax or some other databases. Where is the option in EA to change the destination DDL-syntax.

thomaskilian

  • Guest
Re: Generate DDL for MySql or other databases
« Reply #1 on: May 09, 2006, 01:41:14 pm »
In the Class properties for the Table there's a dropdown right in the middle.

rneelakantan

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Generate DDL for MySql or other databases
« Reply #2 on: May 09, 2006, 02:49:38 pm »
It looks like this syntax is for MS SQL Server and not for MySQL.  Are you sure db type is set to MySQL for the tables?

steltner

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Generate DDL for MySql or other databases
« Reply #3 on: May 10, 2006, 03:30:01 am »
Yes, that's tru it looks like a script for MS SQL Server. I checked all tables and all are set to MySQL database. I have no idea where the "dbo" entry comes from.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Generate DDL for MySql or other databases
« Reply #4 on: May 10, 2006, 12:34:30 pm »
Just a guess. Take a look at the Settings / Database Datatypes dialog. What, if any, is the default Product Name?
No, you can't have it!

thomaskilian

  • Guest
Re: Generate DDL for MySql or other databases
« Reply #5 on: May 11, 2006, 02:08:09 am »
Hmm. If this influences the DDL generation then it's definitely a bug. This shall be controlled by just the table settings.

Steltner, you should submit a bug report to Sparx. They should be able to help you out or find the possible bug in EA.