Last active
June 14, 2017 03:45
-
-
Save Fykec/28a68a0636c7f436876350c96241a0f5 to your computer and use it in GitHub Desktop.
Demo: v2 to v3 sqlite3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 更新数据表结构*/ | |
CREATE TABLE IF NOT EXISTS "mapping_user_plan" ( | |
"id" integer PRIMARY KEY, | |
"user_id" integer, | |
"plan_id" integer, | |
"created_at" text | |
); | |
/* 也可以更新数据 */ | |
insert into mapping_user_plan(user_id, plan_id, created_at) select 1, id, created_at from plan; | |
/* 最后设置 user version */ | |
PRAGMA user_version=3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment