Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check and create tables on start up #10

Open
holic opened this issue Dec 6, 2011 · 0 comments
Open

Check and create tables on start up #10

holic opened this issue Dec 6, 2011 · 0 comments
Labels

Comments

@holic
Copy link
Member

holic commented Dec 6, 2011

CREATE TABLE IF NOT EXISTS `MiracleGrow_world_blocks` (
    `x` smallint(6) NOT NULL DEFAULT '0',
    `y` tinyint(4) NOT NULL DEFAULT '0',
    `z` smallint(6) NOT NULL DEFAULT '0',
    `type` smallint(6) DEFAULT NULL,
    `data` tinyint(4) DEFAULT NULL,
    PRIMARY KEY (`x`,`y`,`z`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MiracleGrow_world_jobs` (
    `x` smallint(6) NOT NULL DEFAULT '0',
    `y` tinyint(4) NOT NULL DEFAULT '0',
    `z` smallint(6) NOT NULL DEFAULT '0',
    `chunk_x` smallint(6) NOT NULL DEFAULT '0',
    `chunk_z` smallint(6) NOT NULL DEFAULT '0',
    `when` timestamp NULL DEFAULT NULL,
    `job` int(11) DEFAULT NULL,
    `updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`x`,`y`,`z`),
    INDEX `when` (`when`),
    INDEX `job` (`job`),
    INDEX `x` (`x`),
    INDEX `y` (`y`),
    INDEX `z` (`z`),
    INDEX `chunk_x` (`chunk_x`),
    INDEX `chunk_z` (`chunk_z`),
    INDEX `chunk_xz` (`chunk_x`,`chunk_z`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant