Home > database >  PowerDesigner modify the name of the table, updates to the database failure
PowerDesigner modify the name of the table, updates to the database failure

Time:10-07

1, the original table:



2, change table "clas" for "class" :



3, update the database:



4, it should not modify the name of the table, but directly to delete the old table, to build a new:



5, so wrong:


6, the generated SQL statement is also wrong, clas table and other tables have correlation, direct delete error certain:


Have used PowerDesigner great god, and advice on where I went wrong, just learn to use PowerDesigner, very not easy in this step, a day cannot solve the

Using database is MySQL5.7 PowerDesigner15.1

CodePudding user response:

Without PD advice directly to write SQL to the database

CodePudding user response:

Direct write SQL that I might as well use navicat

CodePudding user response:

In the database directly with the rename modified table name

The alter table tb1 rename tb2),

CodePudding user response:

reference rucypli reply: 3/f
in the database directly using rename modified table name

The alter table tb1 rename tb2),


This method can be, but I want to learn with pd, from pd changes and updates to the database

CodePudding user response:

Don't really have the great god will use powerdesigner

CodePudding user response:

Powerdesigner is to remove the original table, create the new table, so we will just start to build a database using powerdesigner model generates the database directly, behind will no longer use powerdesigner map directly to the database, because it may all the data in the database, you can choose when import database table, which a few tables, only update you modify didn't modify the table don't update,
We now project way is:
1: the project started, powerdesigner one-time built model, an import, began to develop,
2: project, changes to existing table, manual to modify data,
3: project, the new table, using powerdesigner, new generation SQL statements, performed to the database,
4: a project, the role of powerdesigner is mainly used for everyone, can return to the powerdesigner from the database table structure, so there is no need to put the database design file copy to copy, all design documents for the latest data from the database directly,
  • Related