5. Get Table Definitions;
Tablespaces. (Open table def. and copy all then paste into SQL Query window box)
Code:
CREATE TABLESPACE "co_MainData"
OWNER postgres
LOCATION 'C:/COFullDB/Main/OtherData';
CREATE TABLESPACE "co_Indexes"
OWNER postgres
LOCATION 'C:/COFullDB/Main/Indexes';
CREATE TABLESPACE "co_CharacterData"
OWNER postgres
LOCATION 'C:/COFullDB/Main/CharacterData';
CREATE TABLESPACE "co_AuthTables"
OWNER postgres
LOCATION 'C:/COFullDB/Main/AuthTables';
-- Table: "Account"
-- DROP TABLE "Account";
CREATE TABLE "Account"
(
"AccountID" varchar(16) NOT NULL,
"Password" char(32),
"LastLogon" timestamp,
"LogonCount" int4 NOT NULL DEFAULT 0,
"LogonAction" int2 NOT NULL DEFAULT 2, -- 0 = User does not exist (should never be on an active account)
"Flags" int4 DEFAULT 0,
"IPAddress" inet,
CONSTRAINT "pkey_Account_AccountID" PRIMARY KEY ("AccountID") USING INDEX TABLESPACE "co_Indexes"
)
WITHOUT OIDS TABLESPACE "co_AuthTables";
ALTER TABLE "Account" OWNER TO postgres;
COMMENT ON COLUMN "Account"."LogonAction" IS '0 = User does not exist (should never be on an active account)
1 = Normal Logon
2 = Create Character
4 = Banned';
-- Index: "ix_Account_AccountID"
-- DROP INDEX "ix_Account_AccountID";
CREATE UNIQUE INDEX "ix_Account_AccountID"
ON "Account"
USING btree
("AccountID")
TABLESPACE "co_Indexes";
CREATE SEQUENCE "Characters_CharacterID_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 41
CACHE 1;
ALTER TABLE "Characters_CharacterID_seq" OWNER TO postgres;
-- Table: "Characters"
-- DROP TABLE "Characters";
CREATE TABLE "Characters"
(
"CharacterID" int4 NOT NULL DEFAULT nextval('"Characters_CharacterID_seq"'::regclass),
"Account" char(16) NOT NULL,
"Name" char(16) NOT NULL,
"Level" int2 NOT NULL DEFAULT 1,
"Experience" int4 NOT NULL DEFAULT 0,
"Class" int4 NOT NULL,
"Model" int4 NOT NULL,
"Strength" int4 NOT NULL DEFAULT 0,
"Agility" int4 NOT NULL DEFAULT 0,
"Spirit" int4 NOT NULL DEFAULT 0,
"Vitality" int4 NOT NULL DEFAULT 0,
"Flags" int2 NOT NULL DEFAULT 0,
"HP" int4 NOT NULL DEFAULT 1,
"MP" int4 NOT NULL DEFAULT 0,
"PKPoints" int4 NOT NULL DEFAULT 0,
"LocationX" int4 NOT NULL DEFAULT 438,
"LocationY" int4 NOT NULL DEFAULT 377,
"Map" int4 NOT NULL DEFAULT 1011,
"Money" int8 NOT NULL DEFAULT 0,
"StatPoints" int2 NOT NULL DEFAULT 0,
"Spouse" int4 NOT NULL DEFAULT 0,
CONSTRAINT "pkey_Characters_CharacterID" PRIMARY KEY ("CharacterID") USING INDEX TABLESPACE "co_Indexes",
CONSTRAINT "fkey_Characters_Account" FOREIGN KEY ("Account")
REFERENCES "Account" ("AccountID") MATCH FULL
ON UPDATE RESTRICT ON DELETE RESTRICT,
CONSTRAINT "ukey_Characters_Name" UNIQUE ("Name") USING INDEX TABLESPACE "co_Indexes"
)
WITHOUT OIDS TABLESPACE "co_CharacterData";
ALTER TABLE "Characters" OWNER TO postgres;
-- Table: "DefaultStats"
-- DROP TABLE "DefaultStats";
CREATE TABLE "DefaultStats"
(
"Class" int2 NOT NULL,
"Strength" int4 NOT NULL,
"Agility" int4 NOT NULL,
"Vitality" int4 NOT NULL,
"Spirit" int4 NOT NULL,
"Level" int2 NOT NULL,
CONSTRAINT "pkey_DefaultStats_LevelClass" PRIMARY KEY ("Class", "Level") USING INDEX TABLESPACE "co_Indexes"
)
WITHOUT OIDS;
ALTER TABLE "DefaultStats" OWNER TO postgres;
-- Table: "Portals"
-- DROP TABLE "Portals";
CREATE TABLE "Portals"
(
"Name" varchar(12) NOT NULL,
"FromMap" int4 NOT NULL DEFAULT 0,
"FromX" int2 NOT NULL DEFAULT 0,
"FromY" int2 NOT NULL DEFAULT 0,
"ToMap" int2 NOT NULL DEFAULT 0,
"ToX" int2 NOT NULL DEFAULT 0,
"ToY" int2 NOT NULL DEFAULT 0,
CONSTRAINT "pkey_Portals_Name" PRIMARY KEY ("Name") USING INDEX TABLESPACE "co_Indexes"
)
WITHOUT OIDS;
ALTER TABLE "Portals" OWNER TO postgres;
-- Table: "Servers"
-- DROP TABLE "Servers";
CREATE TABLE "Servers"
(
"ServerName" text NOT NULL,
"IPAddress" text NOT NULL,
CONSTRAINT "pkey_Servers_ServerName" PRIMARY KEY ("ServerName") USING INDEX TABLESPACE "co_Indexes"
)
WITHOUT OIDS TABLESPACE "co_AuthTables";
ALTER TABLE "Servers" OWNER TO postgres;
-- Table: "Settings"
-- DROP TABLE "Settings";
CREATE TABLE "Settings"
(
"Name" text NOT NULL,
"Value" text NOT NULL,
CONSTRAINT "pkey_Settings_Name" PRIMARY KEY ("Name") USING INDEX TABLESPACE "co_Indexes"
)
WITHOUT OIDS;
ALTER TABLE "Settings" OWNER TO postgres;
INSERT INTO "DefaultStats" ("Class", "Strength", "Agility", "Vitality", "Spirit", "Level") VALUES (1, 5, 2, 3, 0, 1);
INSERT INTO "DefaultStats" ("Class", "Strength", "Agility", "Vitality", "Spirit", "Level") VALUES (1, 7, 2, 4, 0, 2);
INSERT INTO "DefaultStats" ("Class", "Strength", "Agility", "Vitality", "Spirit", "Level") VALUES (4, 2, 7, 1, 0, 1);
INSERT INTO "DefaultStats" ("Class", "Strength", "Agility", "Vitality", "Spirit", "Level") VALUES (10, 0, 2, 3, 5, 1);
INSERT INTO "DefaultStats" ("Class", "Strength", "Agility", "Vitality", "Spirit", "Level") VALUES (2, 5, 2, 3, 0, 1);
but when i make the sql query.
sorry i found the solution on another place. i paste it so other ppl can get it