How to remove all migration using migrator.net and back to the fresh datbase

27 views
Skip to first unread message

amit appdev

unread,
Oct 20, 2015, 2:36:34 AM10/20/15
to migratordotnet-devel
I have a database, which contain only one table called "Player".

please find below database diagram with player table:

I have created two migration for my database.

MIgration 1 : Added new table "Sports".


MIgration 2 : Added new column "Award" in Sports table.


I can easily go back from Migration 2 to Migraiton 1.

But how can I remove Migration 1 and delete the Sport table from my database.
I want to go back to the database original state , means only "Player" table nothing else.

Please help me to solve this scenario.

Thanks in advance. 





amit appdev

unread,
Oct 20, 2015, 2:41:05 AM10/20/15
to migratordotnet-devel
Please find below the source code, which I used for adding table in database using Migrator.Net framework
 
Migration 1

Database.AddTable("Sport",
               new Column("Name", DbType.String),
               new Column("Location", DbType.String));


Migration 2

   Database.AddColumn("Sport", new Column("Award", DbType.String)); 
Reply all
Reply to author
Forward
0 new messages