How to automatically execute a MySQL script or subroutine after forward engineering from a model

I created an EER model in MySQL Workbench, which I am rebuilding to create a database. Direct engineering works just fine, and the database is created on the chart as expected.

In addition to tables, there are also some stored procedures (aka Routines) that I included in the model. These procedures are designed to run only once, once the database is configured. They automatically insert the necessary data into the tables.

My question is how can I get the direct engineering process to automatically call / execute one of these routines after creating the tables.

Right now I need to rebuild the database and then manually call the stored procedures?

+5
source share
1 answer

In the EER chart on the desktop, right-click on the table and select edit table. This will open n panels at the bottom with a few tabs. Tabs are a table, columns, indexes, a foreign key, etc. There is a tab called insert. This tab allows you to insert records into the model database.

When you click on the insert tab, you will see a grid. Add the entries you want to insert into this grid. Make sure you commit these entries . See screenshot for an example.

Workbench data insert

, , insert. , , , . script, , workbench MySQL.

Tick ​​insert option

, , , , . . , , . . / (frm modeller). MySQL . INSERT MYSQL script script.

:

  • .

  • /

  • INSERT, , script, MySQL Workbench

UPDATE:

, script, , ( ), script. script .

, !

+5

All Articles