diff options
author | Kevin Chabowski <kevin@kch42.de> | 2012-05-20 14:08:34 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2012-05-20 14:08:34 +0200 |
commit | 0915d74865b0cab61c3a505e802b80ac048cdd3f (patch) | |
tree | 5d914d22078ded1b65e60517326b8aa1911ca508 /ratatoeskr/setup/create_tables.php | |
parent | 40cafe0ca0699647781e8953b413622b8e341913 (diff) | |
parent | 793b0e31beb22fe33402c8a9ceebf47a5a950635 (diff) | |
download | ratatoeskr-cms-0915d74865b0cab61c3a505e802b80ac048cdd3f.tar.gz ratatoeskr-cms-0915d74865b0cab61c3a505e802b80ac048cdd3f.tar.bz2 ratatoeskr-cms-0915d74865b0cab61c3a505e802b80ac048cdd3f.zip |
Merge branch 'feature-plugin-articledata' into develop
Diffstat (limited to 'ratatoeskr/setup/create_tables.php')
-rw-r--r-- | ratatoeskr/setup/create_tables.php | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/ratatoeskr/setup/create_tables.php b/ratatoeskr/setup/create_tables.php index 819970a..97a4cd5 100644 --- a/ratatoeskr/setup/create_tables.php +++ b/ratatoeskr/setup/create_tables.php @@ -20,12 +20,12 @@ CREATE TABLE IF NOT EXISTS `PREFIX_articles` ( `timestamp` bigint(20) NOT NULL, `allow_comments` int(11) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_article_tag_relations` ( `tag` int(11) NOT NULL, `article` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_comments` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -38,30 +38,30 @@ CREATE TABLE IF NOT EXISTS `PREFIX_comments` ( `visible` tinyint(4) NOT NULL, `read_by_admin` tinyint(4) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_groups` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` text COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_group_members` ( `user` int(11) NOT NULL, `group` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_images` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` text COLLATE utf8_unicode_ci NOT NULL, `file` text COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_multilingual` ( `id` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_plugins` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -82,13 +82,13 @@ CREATE TABLE IF NOT EXISTS `PREFIX_plugins` ( `update` tinyint(4) NOT NULL, `api` int(11) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `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; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_repositories` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -98,7 +98,7 @@ CREATE TABLE IF NOT EXISTS `PREFIX_repositories` ( `pkgcache` text COLLATE utf8_unicode_ci NOT NULL, `lastrefresh` bigint(20) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_sections` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -107,38 +107,38 @@ CREATE TABLE IF NOT EXISTS `PREFIX_sections` ( `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; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_section_style_relations` ( `section` int(11) NOT NULL, `style` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `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; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `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, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `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; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `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; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `PREFIX_users` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -148,7 +148,20 @@ CREATE TABLE IF NOT EXISTS `PREFIX_users` ( `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; +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE IF NOT EXISTS `PREFIX_meta` ( + `key` text COLLATE utf8_unicode_ci NOT NULL, + `value` text COLLATE utf8_unicode_ci NOT NULL +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + + +CREATE TABLE IF NOT EXISTS `PREFIX_article_extradata` ( + `article` int(11) NOT NULL, + `plugin` int(11) NOT NULL, + `key` text COLLATE utf8_unicode_ci NOT NULL, + `value` text COLLATE utf8_unicode_ci NOT NULL +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; SQL; function create_mysql_tables() @@ -161,6 +174,8 @@ function create_mysql_tables() if(!empty($q)) qdb($q); } + + qdb("INSERT INTO `PREFIX_meta` (`key`, `value`) VALUES ('dbversion', '%s')", base64_encode(serialize(1))); } ?> |