strapi / migration-scripts

Collection of Strapi Migration scripts
58 stars 57 forks source link

v3SQl > v4SQL: Model tables are not being created? #82

Closed tprommer closed 1 year ago

tprommer commented 1 year ago

Bug report

Describe the bug

When running the scripts I get DESTINATION TABLE does not exist for all my content types; I cannot find any code that would actually create the DESTINATION tables when trying to troubleshoot. Is the concept of the migration scripts that the content types first get created in a manual manner in Strapi v4 and the migration does not migrate schemas but only data?

Expected behavior

Destination tables being created for all content types based on source.

derrickmehaffy commented 1 year ago

As mentioned on this README page: https://github.com/strapi/migration-scripts/tree/main/v3-sql-v4-sql

You have to first start your v4 application on an empty DB to generate the tables, the migration script intends that you have the following:

Currently and for the foreseeable future we do not plan to allow in-place upgrades on the same database (not database server, the actual database inside of the server)

Marking this issue as closed for now but if you feel I missed something please let me know.

tprommer commented 1 year ago

Thanks @derrickmehaffy — confirming this has been in place but does not answer my questions. v4 database is clean and empty and content for users etc is properly migratied.

My concrete questions is if the script is meant to create the TABLES not database for all my content types I have sitting in the v3 database (i.e. Animal, Person, NameComponent etc)

Thanks for you input!

derrickmehaffy commented 1 year ago

Thanks @derrickmehaffy — confirming this has been in place but does not answer my questions. v4 database is clean and empty and content for users etc is properly migratied.

My concrete questions is if the script is meant to create the TABLES not database for all my content types I have sitting in the v3 database (i.e. Animal, Person, NameComponent etc)

Thanks for you input!

No it was not intended to create the tables as the table structure changed from v3 to v4. Since the script isn't aware of what that structure should be it can't determine the v4 structure just from a v3 DB. Only the v4 app and the Strapi schema knows that.