• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

0.2 to 0.3 database

Cosmotonio

New Member
Joined
Nov 26, 2007
Messages
142
Reaction score
0
Please developers, when the 0.3 version will finished put a sql file in TFS folder that update the mysql database.
 
Code:
    CREATE TABLE `server_motd`
    (
        `id` INT NOT NULL AUTO_INCREMENT,
        `text` TEXT NOT NULL,
        PRIMARY KEY (`id`)
    ) ENGINE = InnoDB;

    CREATE TABLE `server_record`
    (
        `record` INT NOT NULL,
        `timestamp` BIGINT NOT NULL,
        PRIMARY KEY (`timestamp`)
    ) ENGINE = InnoDB;

    CREATE TABLE `global_storage`
    (
        `key` INT UNSIGNED NOT NULL,
        `value` INT NOT NULL,
        PRIMARY KEY  (`key`)
    ) ENGINE = InnoDB;

    INSERT INTO `server_record` VALUES (0, 0);
    INSERT INTO `server_motd` VALUES (1, 'Welcome to The Forgotten Server!');

    DROP TABLE `bans`;
    CREATE TABLE `bans`
    (
        `id` INT UNSIGNED NOT NULL auto_increment,
        `type` TINYINT(1) NOT NULL COMMENT 'this field defines if its ip, account, player, or any else ban',
        `value` INT UNSIGNED NOT NULL COMMENT 'ip, player guid, account number',
        `param` INT UNSIGNED NOT NULL DEFAULT 4294967295 COMMENT 'mask',
        `active` TINYINT(1) NOT NULL DEFAULT TRUE,
        `expires` INT UNSIGNED NOT NULL,
        `added` INT UNSIGNED NOT NULL,
        `admin_id` INT UNSIGNED NOT NULL DEFAULT 0,
        `comment` TEXT NOT NULL DEFAULT '',
        `reason` INT UNSIGNED NOT NULL DEFAULT 0,
        `action` INT UNSIGNED NOT NULL DEFAULT 0,
        PRIMARY KEY  (`id`),
        KEY `type` (`type`, `value`)
    ) ENGINE = InnoDB;

    TRUNCATE TABLE `groups`;
    ALTER TABLE `groups` ADD `customflags` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `flags`;
    ALTER TABLE `groups` ADD `violationaccess` INT NOT NULL AFTER `access`;
    INSERT INTO `groups` VALUES (1, 'Player', 0, 0, 0, 0, 0, 0);
    INSERT INTO `groups` VALUES (2, 'Tutor', 16809984, 1, 1, 0, 0, 0);
    INSERT INTO `groups` VALUES (3, 'Senior Tutor', 68736352256, 3, 2, 1, 0, 0);
    INSERT INTO `groups` VALUES (4, 'Game Master', 492842123151, 63, 3, 2, 4000, 200);
    INSERT INTO `groups` VALUES (5, 'Community Manager', 542239465466, 1279, 4, 3, 6000, 300);
    INSERT INTO `groups` VALUES (6, 'God', 546534563834, 2047, 5, 3, 8000, 400);

    ALTER TABLE `players` ADD `balance` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `blessings`;
    ALTER TABLE `players` ADD `stamina` BIGINT UNSIGNED NOT NULL DEFAULT 201660000 AFTER `balance`;
    ALTER TABLE `players` CHANGE `loss_experience` `loss_experience` INT NOT NULL DEFAULT 10;
    ALTER TABLE `players` CHANGE `loss_mana` `loss_mana` INT NOT NULL DEFAULT 10;
    ALTER TABLE `players` CHANGE `loss_skills` `loss_skills` INT NOT NULL DEFAULT 10;
    ALTER TABLE `players` ADD `loss_items` INT NOT NULL DEFAULT 10 AFTER `loss_skills`;
    UPDATE `players` SET `loss_experience` = 10, `loss_mana` = 10, `loss_skills` = 10, `loss_items` = 10;

    ALTER TABLE `accounts` DROP `type`;
    ALTER TABLE `player_deaths` DROP `is_player`;

    ALTER TABLE `houses` CHANGE `warnings` `warnings` INT NOT NULL DEFAULT 0;
    ALTER TABLE `houses` ADD `lastwarning` INT UNSIGNED NOT NULL DEFAULT 0;

But it will clean all bans and groups.
 
If he runs it he will lose all the accounts and players, and he don't want to do that.
 
He can make a back up of his old sql file and copy accounts and players values to the new one and add the new fields.
(new fields would be 1 or 2 fields ;)
 
Just use Nightmare's sql "updating file". It won't delete any account/players/houses, just banishments and groups (and I think that's not so important).

Yours,
Rafael Hamdan;
 
Last edited:
Just use Nightmare's sql "updating file". It won't delete any account/players/houses, just banishments and groups (and I think that's not so important).

Yours,
Rafael Hamdan;
Its not Nightmare's updating file, its copied from CHANGELOG, if he would read, he'd know.
 
All im getting from this is that those table already exists and it shows like a bugg.
 
Back
Top Bottom