Exemplo n.º 1
0
        private void CreateTables()
        {
            if (!SQLUtils.CheckTableExists(CategoryTable, client))
            {
                CreateCategoriesTable();
            }

            if (!SQLUtils.CheckTableExists(ItemsTable, client))
            {
                CreateItemsTable();
            }

            if (!SQLUtils.CheckTableExists(TagsTable, client))
            {
                CreateTagsTable();
            }

            if (!SQLUtils.CheckTableExists(ItemTagsTable, client))
            {
                CreateItemTagsTable();
            }

            if (!SQLUtils.CheckTableExists(ItemAttributesTable, client))
            {
                CreateItemAttributesTable();
            }
        }
Exemplo n.º 2
0
        private void Upgrade()
        {
            if (!SQLUtils.CheckTableExists(TableDrafts, this))
            {
                ExecuteNonQuery(CreateDraftsTableQuery);
            }

            if (!SQLUtils.CheckTableExists(TableSubscribed, this))
            {
                ExecuteNonQuery(CreateSubscribedTableQuery);
            }
        }
Exemplo n.º 3
0
        private void CreateTables()
        {
            if (!SQLUtils.CheckTableExists(VideosTable, this))
            {
                string sql = LoadFromText("CreateSeriesTable", SeriesTable);
                ExecuteNonQuery(sql);

                sql = LoadFromText("CreateVideosTable", VideosTable, SeriesTable);
                ExecuteNonQuery(sql);

                sql = LoadFromText("CreateTagsTable", TagsTable, VideosTable);
                ExecuteNonQuery(sql);
            }

            if (!SQLUtils.CheckTableExists(RatingsTable, this))
            {
                string sql = LoadFromText("CreateRatingsTable", RatingsTable, VideosTable);
                ExecuteNonQuery(sql);
            }
        }