diff options
author | Kevin Chabowski <kevin@kch42.de> | 2011-07-21 14:14:40 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2011-07-21 14:14:40 +0200 |
commit | 8f431ef8af6c83aa9ebdcd8a2dd6252759127de1 (patch) | |
tree | eaabc5d0568a182dd911d06afd611d2c17e71754 /ratatoeskr/setup/create_tables.php | |
parent | 70389c5e60bce048cb97f2c91c83fc210cf44797 (diff) | |
download | ratatoeskr-cms-8f431ef8af6c83aa9ebdcd8a2dd6252759127de1.tar.gz ratatoeskr-cms-8f431ef8af6c83aa9ebdcd8a2dd6252759127de1.tar.bz2 ratatoeskr-cms-8f431ef8af6c83aa9ebdcd8a2dd6252759127de1.zip |
(Almost) finished DB-Models / abstraction layer.
Diffstat (limited to 'ratatoeskr/setup/create_tables.php')
-rw-r--r-- | ratatoeskr/setup/create_tables.php | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/ratatoeskr/setup/create_tables.php b/ratatoeskr/setup/create_tables.php new file mode 100644 index 0000000..b024d51 --- /dev/null +++ b/ratatoeskr/setup/create_tables.php @@ -0,0 +1,139 @@ +<?php + + +$sql = <<<SQL +SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; + +CREATE TABLE `PREFIX_acl` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `acl_json` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_articles` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `urltitle` text COLLATE utf8_unicode_ci NOT NULL, + `title` int(11) NOT NULL, + `text` int(11) NOT NULL, + `excerpt` int(11) NOT NULL, + `meta` text COLLATE utf8_unicode_ci NOT NULL, + `custom` text COLLATE utf8_unicode_ci NOT NULL, + `acl` int(11) NOT NULL, + `article_img` int(11) NOT NULL, + `status` int(11) NOT NULL, + `section` int(11) NOT NULL, + `timestamp` bigint(20) NOT NULL, + `allow_comments` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_article_tag_relations` ( + `tag` int(11) NOT NULL, + `article` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_comments` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `article` int(11) NOT NULL, + `language` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `author_name` text COLLATE utf8_unicode_ci NOT NULL, + `author_mail` text COLLATE utf8_unicode_ci NOT NULL, + `text` text COLLATE utf8_unicode_ci NOT NULL, + `timestamp` bigint(20) NOT NULL, + `visible` tinyint(4) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_groups` ( + `int` int(11) NOT NULL AUTO_INCREMENT, + `name` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`int`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_group_memers` ( + `user` int(11) NOT NULL, + `group` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_images` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text COLLATE utf8_unicode_ci NOT NULL, + `alt` int(11) NOT NULL, + `file` text COLLATE utf8_unicode_ci NOT NULL, + `acl` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_multilingual` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_plugins` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text COLLATE utf8_unicode_ci NOT NULL, + `class` text COLLATE utf8_unicode_ci NOT NULL, + `version` text COLLATE utf8_unicode_ci NOT NULL, + `author` text COLLATE utf8_unicode_ci NOT NULL, + `author_url` text COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci NOT NULL, + `help` text COLLATE utf8_unicode_ci NOT NULL, + `phpcode` text COLLATE utf8_unicode_ci NOT NULL, + `active` tinyint(4) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_plugin_kvstorage` ( + `plugin` int(11) NOT NULL, + `key` text COLLATE utf8_unicode_ci NOT NULL, + `value` text COLLATE utf8_unicode_ci NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_sections` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text COLLATE utf8_unicode_ci NOT NULL, + `title` int(11) NOT NULL, + `template` text COLLATE utf8_unicode_ci NOT NULL, + `styles` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_settings_kvstorage` ( + `key` text COLLATE utf8_unicode_ci NOT NULL, + `value` text COLLATE utf8_unicode_ci NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_styles` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text COLLATE utf8_unicode_ci NOT NULL, + `code` text COLLATE utf8_unicode_ci NOT NULL, + `acl` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_tags` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text COLLATE utf8_unicode_ci NOT NULL, + `title` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_translations` ( + `multilingual` int(11) NOT NULL, + `language` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `text` text COLLATE utf8_unicode_ci NOT NULL, + `texttype` text COLLATE utf8_unicode_ci NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE `PREFIX_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` text COLLATE utf8_unicode_ci NOT NULL, + `pwhash` text COLLATE utf8_unicode_ci NOT NULL, + `mail` text COLLATE utf8_unicode_ci NOT NULL, + `fullname` text COLLATE utf8_unicode_ci NOT NULL, + `language` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +SQL; + +?> |