Browse Source

add data conversion scripts for PGSQL.

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
fa939cfc1c
  1. 7
      pyweb/mumble/conversionsql/pgsql/01-schema-prepare-mumble.sql
  2. 3
      pyweb/mumble/conversionsql/pgsql/11-data-mumble_mumbleserver.sql
  3. 6
      pyweb/mumble/conversionsql/pgsql/12-data-mumble_mumble.sql
  4. 32
      pyweb/mumble/conversionsql/pgsql/21-schema-cleanup-mumble.sql
  5. 3
      pyweb/mumble/conversionsql/pgsql/22-schema-cleanup-mumbleuser.sql

7
pyweb/mumble/conversionsql/pgsql/01-schema-prepare-mumble.sql

@ -0,0 +1,7 @@
-- Model: Mumble
ALTER TABLE "mumble_mumble"
ADD "server_id" integer NULL REFERENCES "mumble_mumbleserver" ("id") DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "mumble_mumble"
ADD "display" varchar(200);
CREATE INDEX "mumble_mumble_server_id" ON "mumble_mumble" ("server_id");

3
pyweb/mumble/conversionsql/pgsql/11-data-mumble_mumbleserver.sql

@ -0,0 +1,3 @@
INSERT INTO "mumble_mumbleserver" ( "dbus", "secret" )
SELECT DISTINCT "dbus", ''
FROM "mumble_mumble";

6
pyweb/mumble/conversionsql/pgsql/12-data-mumble_mumble.sql

@ -0,0 +1,6 @@
UPDATE "mumble_mumble"
SET "server_id"=(
SELECT "id"
FROM "mumble_mumbleserver"
WHERE "mumble_mumbleserver"."dbus" = "mumble_mumble"."dbus"
);

32
pyweb/mumble/conversionsql/pgsql/21-schema-cleanup-mumble.sql

@ -0,0 +1,32 @@
-- Model: Mumble
ALTER TABLE "mumble_mumble"
DROP COLUMN "dbus";
ALTER TABLE "mumble_mumble"
DROP COLUMN "url";
ALTER TABLE "mumble_mumble"
DROP COLUMN "motd";
ALTER TABLE "mumble_mumble"
DROP COLUMN "passwd";
ALTER TABLE "mumble_mumble"
DROP COLUMN "supw";
ALTER TABLE "mumble_mumble"
DROP COLUMN "users";
ALTER TABLE "mumble_mumble"
DROP COLUMN "bwidth";
ALTER TABLE "mumble_mumble"
DROP COLUMN "sslcrt";
ALTER TABLE "mumble_mumble"
DROP COLUMN "sslkey";
ALTER TABLE "mumble_mumble"
DROP COLUMN "obfsc";
ALTER TABLE "mumble_mumble"
DROP COLUMN "player";
ALTER TABLE "mumble_mumble"
DROP COLUMN "channel";
ALTER TABLE "mumble_mumble"
DROP COLUMN "defchan";
ALTER TABLE "mumble_mumble"
DROP COLUMN "booted";
ALTER TABLE "mumble_mumble"
ALTER COLUMN "server_id" SET NOT NULL;

3
pyweb/mumble/conversionsql/pgsql/22-schema-cleanup-mumbleuser.sql

@ -0,0 +1,3 @@
-- Model: MumbleUser
ALTER TABLE "mumble_mumbleuser"
DROP COLUMN "isAdmin";
Loading…
Cancel
Save