37 lines
848 B
SQL
37 lines
848 B
SQL
-- ----------------------------
|
|
-- Table structure for nb_state
|
|
-- ----------------------------
|
|
CREATE TABLE IF NOT EXISTS "nb_state" (
|
|
"id" integer NOT NULL,
|
|
"ne_type" text(32) NOT NULL,
|
|
"ne_id" text(32) NOT NULL,
|
|
"rm_uid" text(128),
|
|
"create_time" integer(20),
|
|
"address" text(255),
|
|
"name" text(64),
|
|
"position" text(64),
|
|
"nb_name" text(128),
|
|
"nb_id" integer,
|
|
"state" text(12),
|
|
"time" text(64),
|
|
PRIMARY KEY ("id")
|
|
);
|
|
|
|
-- ----------------------------
|
|
-- Indexes structure for table nb_state
|
|
-- ----------------------------
|
|
CREATE UNIQUE INDEX IF NOT EXISTS "uk_state_type_id_uid_at"
|
|
ON "nb_state" (
|
|
"ne_type" ASC,
|
|
"ne_id" ASC,
|
|
"rm_uid" ASC,
|
|
"create_time" ASC
|
|
);
|
|
|
|
-- ADD COLUMN
|
|
ALTER TABLE "nb_state" ADD COLUMN "nb_id" integer;
|
|
|
|
-- ----------------------------
|
|
-- Records of nb_state
|
|
-- ----------------------------
|