CREATE TABLE IF NOT EXISTS "t_scene"  (
  "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  "title" TEXT NOT NULL,
  "num" TEXT NOT NULL,
  "upload_time" text NOT NULL,
  "shoot_count" integer,
  "space" integer NOT NULL
);

CREATE UNIQUE INDEX IF NOT EXISTS "IDX_NUM"
ON "t_scene" (
  "num"
);

CREATE INDEX IF NOT EXISTS"IDX_TITLE"
ON "t_scene" (
  "title"
);

CREATE TABLE IF NOT EXISTS "t_user"  (
  "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  "user_name" TEXT NOT NULL,
  "password" TEXT NOT NULL
);

CREATE UNIQUE INDEX IF NOT EXISTS "IDX_USERNAME"
ON "t_user" (
  "user_name"
);