示例#1
0
文件: upgrade.py 项目: boxed/CMi
def upgrade_2():
    run_sql('ALTER TABLE tvshows_episode ADD COLUMN "watched_count" INTEGER default 0')
    run_sql("UPDATE tvshows_episode SET watched_count = watched")
示例#2
0
def upgrade_1():
    run_sql('ALTER TABLE tvshows_show ADD COLUMN "auto_erase" bool NOT NULL DEFAULT 1')
示例#3
0
文件: upgrade.py 项目: boxed/CMi
def upgrade_5():
    run_sql('ALTER TABLE "tvshows_show" ADD COLUMN "category_id" integer REFERENCES "tvshows_category" ("id")')
示例#4
0
文件: upgrade.py 项目: boxed/CMi
def upgrade_6():
    run_sql('ALTER TABLE "tvshows_episode" ADD COLUMN "watched_at" DATETIME NOT NULL DEFAULT "1970-01-01 00:00:00"')
示例#5
0
文件: upgrade.py 项目: boxed/CMi
def upgrade_3():
    run_sql('ALTER TABLE tvshows_show ADD COLUMN "source" VARCHAR(255) NOT NULL DEFAULT ""')
示例#6
0
文件: upgrade.py 项目: boxed/CMi
def upgrade_4():
    run_sql('ALTER TABLE tvshows_show ADD COLUMN "ended" bool NOT NULL DEFAULT 0')
示例#7
0
文件: upgrade.py 项目: boxed/CMi
def upgrade_2():
    run_sql(
        'ALTER TABLE tvshows_episode ADD COLUMN "watched_count" INTEGER default 0'
    )
    run_sql('UPDATE tvshows_episode SET watched_count = watched')
示例#8
0
文件: upgrade.py 项目: boxed/CMi
def upgrade_6():
    run_sql(
        'ALTER TABLE "tvshows_episode" ADD COLUMN "watched_at" DATETIME NOT NULL DEFAULT "1970-01-01 00:00:00"'
    )
示例#9
0
文件: upgrade.py 项目: boxed/CMi
def upgrade_5():
    run_sql(
        'ALTER TABLE "tvshows_show" ADD COLUMN "category_id" integer REFERENCES "tvshows_category" ("id")'
    )
示例#10
0
文件: upgrade.py 项目: boxed/CMi
def upgrade_4():
    run_sql(
        'ALTER TABLE tvshows_show ADD COLUMN "ended" bool NOT NULL DEFAULT 0')
示例#11
0
文件: upgrade.py 项目: boxed/CMi
def upgrade_3():
    run_sql(
        'ALTER TABLE tvshows_show ADD COLUMN "source" VARCHAR(255) NOT NULL DEFAULT ""'
    )