Browse Source

drop the "NOT NULL" constraint from the "port" column when converting the DB

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
ca27896c44
  1. 2
      pyweb/mumble/conversionsql/mysql/01-schema-prepare-mumble.sql
  2. 2
      pyweb/mumble/conversionsql/pgsql/01-schema-prepare-mumble.sql
  3. 2
      pyweb/mumble/conversionsql/sqlite/01-schema-mumble.sql

2
pyweb/mumble/conversionsql/mysql/01-schema-prepare-mumble.sql

@ -4,6 +4,8 @@ ALTER TABLE `mumble_mumble`
ADD `server_id` integer FIRST; ADD `server_id` integer FIRST;
ALTER TABLE `mumble_mumble` ALTER TABLE `mumble_mumble`
ADD `display` varchar(200) AFTER `name`; ADD `display` varchar(200) AFTER `name`;
ALTER TABLE `mumble_mumble`
MODIFY `port` integer NULL;
COMMIT; COMMIT;
BEGIN; BEGIN;

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

@ -3,6 +3,8 @@ ALTER TABLE "mumble_mumble"
ADD "server_id" integer NULL REFERENCES "mumble_mumbleserver" ("id") DEFERRABLE INITIALLY DEFERRED; ADD "server_id" integer NULL REFERENCES "mumble_mumbleserver" ("id") DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "mumble_mumble" ALTER TABLE "mumble_mumble"
ADD "display" varchar(200); ADD "display" varchar(200);
ALTER TABLE "mumble_mumble"
ALTER "port" DROP NOT NULL;
CREATE INDEX "mumble_mumble_server_id" ON "mumble_mumble" ("server_id"); CREATE INDEX "mumble_mumble_server_id" ON "mumble_mumble" ("server_id");

2
pyweb/mumble/conversionsql/sqlite/01-schema-mumble.sql

@ -4,7 +4,7 @@ CREATE TABLE "mumble_mumble_new" (
"name" varchar(200) NOT NULL, "name" varchar(200) NOT NULL,
"srvid" integer NOT NULL, "srvid" integer NOT NULL,
"addr" varchar(200) NOT NULL, "addr" varchar(200) NOT NULL,
"port" integer NOT NULL,
"port" integer,
"display" varchar(200) NOT NULL, "display" varchar(200) NOT NULL,
UNIQUE ("server_id", "srvid") UNIQUE ("server_id", "srvid")
); );
Loading…
Cancel
Save