Browse Source

add data conversion scripts for MySQL.

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

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

@ -0,0 +1,12 @@
BEGIN;
-- Model: Mumble
ALTER TABLE `mumble_mumble`
ADD `server_id` integer FIRST;
ALTER TABLE `mumble_mumble`
ADD `display` varchar(200) AFTER `name`;
COMMIT;
BEGIN;
CREATE INDEX `mumble_mumble_server_id_idx`
ON `mumble_mumble` (`server_id`);
COMMIT;

3
pyweb/mumble/conversionsql/mysql/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/mysql/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`
);

29
pyweb/mumble/conversionsql/mysql/21-schema-cleanup-mumble.sql

@ -0,0 +1,29 @@
-- 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`;

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

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