Removing tables after data migration.

Topics: Writing modules
Apr 14, 2011 at 1:33 PM

Helloo :D

I'm currently playing around creating a module to gain an understanding of how things work and I were wondering what orchard table entries I would need to take out to completely remove any trace of the items I created after data migration? Obviously I would drop the tables that I created and I have also seen the entry in Orchard_Framework_DataMigrationRecord but where else should I look? I'm aware that I can perform updates with data migration but I just want to restore things back as if the module is being Installed for the first time.

At the moment I'm just replacing a backup of the database when I need to, perhaps this is the easiest way?  

 

TIA

Nick

 

Coordinator
Apr 14, 2011 at 6:41 PM

It's clearly the easiest bu t I think the migration records are it.

Apr 14, 2011 at 7:09 PM

I thought myself that the data migration records would have been it but after removing the entries, my generated tables, disabling the module and re enabling it again ( a couple of times) data migration doesn't occur so something somewhere is telling Orchard that my module exists or is up-to-date or something and doesn't need to run the migration.

Its not a real issue for me at the moment to be honest, its also quite possibly something to do with me doing something wrong but hey, I'm here to learn and I'm sure I will dig deep enough to figure it out when I really have to ;)

Coordinator
Apr 14, 2011 at 7:20 PM

Well, while developing, we zap the database all the time.

A little trick is to build a recipe to get a new site into the configuration that you want, with sample data and all. Then, with the command-line, you can completely automate the re-creation of a development site.

Apr 14, 2011 at 7:27 PM

Thanks for the info :-)