How to change the table layout?

We have a MySQL Workbench project with two tabs (two schemas / two databases).

  • If we create a table in the first tab, it will join the schema magikweb_dev_igcweb.
  • If we create a table in the second tab, it will be attached to the schema magikweb_dev_igcweb_archive.

If we copy, paste / duplicate the table from the first tab to the second, the resulting table will remain in the first scheme. How can you change the table layout?

Each schema is associated with a specific database, so when we use the "Synchronize Model ..." function, it correctly links all the tables.

Visual support

+6
source share
3 answers

. .

+2

, , .

, , SQL script, , script .

MySQL Workbench v6.3:

  • β†’ β†’ Forward SQL Script
  • SQL script. , , . CREATE TABLE, .
  • β†’
  • β†’ β†’ SQL Script

, . , ( PNG PDF.)

+4

( 4 5):

  1. . table users abc_develop_v1 abc_develop_v2 . abc_develop_v1, abc_develop_v1 table users abc_develop_v1 'users'

  2. . abc_develop_v2, 'users'

  3. table users abc_develop_v2. table users ""

  4. "".

All this. Your table is ready in your chart with the correct one schema:-)

Notes: You can double check by double-clicking on the table in the chart, and look in the right corner. He will show the name Schema.

0
source

Source: https://habr.com/ru/post/1657506/


All Articles