From what I understand, schema.sql helps bypass all the migration scripts and sets up a new database in the current state for new developers. Upon further investigation, there appears to be many problems that prevents this from happening.
mysql_migrations_347ertt3e is empty
seed data is not exported
functions and procedures are not exported
events are not exported
I can run load-from-schema to populate the mysql_migrations_347ertt3e table, but seed data, functions, procedures, and events are still missing. I've already suggested a fix for the missing functions and procedures in issue #29. Events could also be exported in the same way by including the flag --events when dumping the database.
The remaining issue is that seed data for lookup tables is not exported - and this seems intentional as the mysqldump command is explicitly flagged not to include any data.
I would like an option to dump the data as well. Naming the commands as update-data and load-from-data would seem appropriate. You could include the flag --no-create-info so that none of the schema data is added to create tables.
From what I understand, schema.sql helps bypass all the migration scripts and sets up a new database in the current state for new developers. Upon further investigation, there appears to be many problems that prevents this from happening.
I can run
load-from-schema
to populate themysql_migrations_347ertt3e
table, but seed data, functions, procedures, and events are still missing. I've already suggested a fix for the missing functions and procedures in issue #29. Events could also be exported in the same way by including the flag--events
when dumping the database.The remaining issue is that seed data for lookup tables is not exported - and this seems intentional as the
mysqldump
command is explicitly flagged not to include any data.mysqldump --no-data
https://github.com/kawadhiya21/mysql-migrations/blob/65c52086c766d5c91508ba66c3b811682484c4b2/core_functions.js#L121
I would like an option to dump the data as well. Naming the commands as
update-data
andload-from-data
would seem appropriate. You could include the flag--no-create-info
so that none of the schema data is added to create tables.