SambaPOS Forum
English Boards => Support => Topic started by: DQ on November 25, 2013, 06:48:30 pm
-
Hello,
I have created a new Migration_022.cs file to add employee schedule table. I have followed existing migration class file where added [Migration(22)] attribute and Up() and Down() function.
I changed DbVersion to 22 and created migrate.txt file which trigger migration(context) function call and execute migration code but somehow my new class is not getting executed. What am I missing?
var executor = new TaskExecutor(migrationContext);
executor.Execute();
-
You should also update LocalSettings.DefaultDbVersion constant.
-
I don't see DefaultDbVersion. I did change DbVersion .
public static int DbVersion { get { return 22; } }
-
I've noticed you've defined migration class (22) as a private class. Migrator can access public classes since it loads them dynamically from assembly.
-
Thanks !! Ya, I missed that.