You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The local database retains the database name, deletes all tables, executes schema sync locally to generate data tables and structures, and clears the default data of all data tables.
Run the resulting statement executed by 'sql' below, remove all the 'table' foreign key dependencies.
SELECT CONCAT('ALTER TABLE ',TABLE_SCHEMA,'.',TABLE_NAME,' DROP FOREIGN KEY ',CONSTRAINT_NAME,' ;')
FROMinformation_schema.TABLE_CONSTRAINTS c
WHEREc.TABLE_SCHEMA='glass'ANDc.CONSTRAINT_TYPE='FOREIGN KEY';
SELECT CONCAT('ALTER TABLE ','`',TABLE_NAME,'`',' DROP FOREIGN KEY ',CONSTRAINT_NAME,' ;')
FROMinformation_schema.TABLE_CONSTRAINTS c
WHEREc.TABLE_SCHEMA='glass'ANDc.CONSTRAINT_TYPE='FOREIGN KEY';
RDS exports all data tables (data, excludes db structures) of the entire database. Execute the 'db_dump.sql' exported by RDS.
mysql terminal (mysql -uroot -p), run source db_dump.sql
cd local project dev-server, run yarn serve to sync structure to recovery foreign key dependencies.