123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- :VERSION 1 # --------------------------
- BEGIN TRANSACTION;
- CREATE TABLE GridUser (
- "UserID" VARCHAR(255) NOT NULL Primary Key,
- "HomeRegionID" CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
- "HomePosition" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
- "HomeLookAt" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
- "LastRegionID" CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
- "LastPosition" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
- "LastLookAt" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
- "Online" CHAR(5) NOT NULL DEFAULT 'false',
- "Login" CHAR(16) NOT NULL DEFAULT '0',
- "Logout" CHAR(16) NOT NULL DEFAULT '0'
- ) ;
- COMMIT;
- :VERSION 2 # --------------------------
- BEGIN TRANSACTION;
- CREATE TABLE GridUser_tmp (
- "UserID" VARCHAR(255) NOT NULL PRIMARY KEY,
- "HomeRegionID" uuid NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
- "HomePosition" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
- "HomeLookAt" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
- "LastRegionID" uuid NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
- "LastPosition" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
- "LastLookAt" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
- "Online" CHAR(5) NOT NULL DEFAULT 'false',
- "Login" CHAR(16) NOT NULL DEFAULT '0',
- "Logout" CHAR(16) NOT NULL DEFAULT '0'
- );
- COMMIT;
- INSERT INTO GridUser_tmp ("UserID"
- ,"HomeRegionID"
- ,"HomePosition"
- ,"HomeLookAt"
- ,"LastRegionID"
- ,"LastPosition"
- ,"LastLookAt"
- ,"Online"
- ,"Login"
- ,"Logout")
- SELECT "UserID", cast("HomeRegionID" as uuid), "HomePosition" ,"HomeLookAt" , cast("LastRegionID" as uuid),
- "LastPosition"
- ,"LastLookAt"
- ,"Online"
- ,"Login"
- ,"Logout" FROM GridUser;
- DROP TABLE GridUser;
- alter table GridUser_tmp rename to GridUser;
|