Silverstripe upgrade to 4.5 from 3.7:: dev/build

Silverstripe Version:3.7 to 4.5

Question:dev/build creating new tables but no data being migrated

Hi there,

i am in the process of upgrading Silverstripe site from 3.7 to 4.5. I am following the steps mentioned in the upgrade doc. In the step where it says run dev/build…i did it. New tables are getting created with Namespaced table names ( I have not added private static $table_name yet)…that’s fine with me…unfortunately the data is not getting migrated to the new tables. I cant seem to understand why, the document says it should. Can someone please let me know what i might be missing?


I would have thought your easiest solution would be to add $table_name private statics to each model?

Yeah as @christopherdarling said, without the $table_name property SilverStripe is going to build you a new table as it doesn’t realise they’re related.

Another approach is to just manually rename your old tables in the database to their namespaced equivalent.

thanks for the replies guys. In that case i might have misread the documentation. I will try and add table_name property to my models and then try