How to re-Create the customize table after delete manual?

Topics: Customizing Orchard, 中文(Chinese)
Oct 25, 2012 at 9:23 AM
Edited Oct 25, 2012 at 9:24 AM

English:

I create a module and in the migration file create a table, after first run, I delete he table manual, but the table won't be create again. How I do let the table re-Create? Thank you.

 Chinese:

我在Migaration文件中创建了一张表,首次运行后我手工删除了这张表,之后在运行程序就会报出找不到表的错误而不会重新创建表,我应该如何做才能使Orchard重新创建该表?谢谢。

Developer
Oct 25, 2012 at 9:27 AM

Open the database and find the record that holds the version information about the data migrations in the Orchard_Framework_DataMigrations table, and reset it to the desired version number, e.g. 0 to run the Create method, 1 to run UpdateFrom1, 2 to run UpdateFrom2. Recycle your application pool (or save web.config to cause the app pool to recycle) and refresh the admin page.

Oct 25, 2012 at 9:54 AM

That's Great! The table re-Create, Thank you so much, sfmskywalker