protected override void Up(MigrationBuilder migrationBuilder)
 {
     migrationBuilder.EnsureSchema(name: "history");
     migrationBuilder.Sql(TemporalTable.GetTemporalTableSql("Products"));
     migrationBuilder.Sql(TemporalTable.GetTemporalTableSql("Recipes"));
 }
Exemplo n.º 2
0
        public static void InitializeTable()
        {
            SiteTable = getTable("sites1");
            if (SiteTable != null)
            {
                SiteTable.CreateIfNotExists();
            }
            //
            TemporalTable = getTable("temporal1");
            if (TemporalTable != null)
            {
                TemporalTable.CreateIfNotExists();
            }

            RevisionTable = getTable("revision1");
            if (RevisionTable != null)
            {
                RevisionTable.CreateIfNotExists();
            }

            ImagesContainer = getContainer("images1");

            SelectionListTable = getTable("selectionlist1");
            if (SelectionListTable != null)
            {
                SelectionListTable.CreateIfNotExists();
                SelectionInfoStore.CreateSkeleton();
            }

            HistoryTable = getTable("history1");
            if (HistoryTable != null)
            {
                HistoryTable.CreateIfNotExists();
            }

            BoardListTable = getTable("boardlist1");
            if (BoardListTable != null)
            {
                BoardListTable.CreateIfNotExists();
                BoardInfoStore.CreateSkeleton();
            }

            DiscussionListTable = getTable("discussionlist1");
            if (DiscussionListTable != null)
            {
                DiscussionListTable.CreateIfNotExists();
            }

            KeyStoreTable = getTable("keystore1");
            if (KeyStoreTable != null)
            {
                KeyStoreTable.CreateIfNotExists();
            }

            ActivityTable = getTable("activity1");
            if (ActivityTable != null)
            {
                ActivityTable.CreateIfNotExists();
            }

            DiscussionLoadTable = getTable("discussionload1");
            if (DiscussionLoadTable != null)
            {
                DiscussionLoadTable.CreateIfNotExists();
            }

            VoteBookTable = getTable("votebook1");
            if (VoteBookTable != null)
            {
                VoteBookTable.CreateIfNotExists();
            }
        }