Commit 6249d26d authored by Jyhem's avatar Jyhem

[FIX][bp/r70219] Remove annoying 'table xxx already exists' warnings on...

[FIX][bp/r70219] Remove annoying 'table xxx already exists' warnings on database upgrades which were meant to be ignored anyway
parent a18a594f
Pipeline #68242434 failed with stages
in 26 minutes and 1 second
#2008-08-22 lphuberdeau
ALTER TABLE tiki_links ADD COLUMN reltype VARCHAR(50);
CREATE TABLE tiki_semantic_tokens (
CREATE TABLE IF NOT EXISTS tiki_semantic_tokens (
token VARCHAR(15) PRIMARY KEY,
label VARCHAR(25) NOT NULL,
invert_token VARCHAR(15)
......
#2008-09-16 lphuberdeau
CREATE TABLE tiki_webservice (
CREATE TABLE IF NOT EXISTS tiki_webservice (
service VARCHAR(25) NOT NULL PRIMARY KEY,
url VARCHAR(250),
schema_version VARCHAR(5),
schema_documentation VARCHAR(250)
) ENGINE=MyISAM ;
CREATE TABLE tiki_webservice_template (
CREATE TABLE IF NOT EXISTS tiki_webservice_template (
service VARCHAR(25) NOT NULL,
template VARCHAR(25) NOT NULL,
engine VARCHAR(15) NOT NULL,
......
#gillesm 2008-10-27
#2008_10_26 GillesM
CREATE TABLE tiki_groupalert ( `groupName` varchar(255) NOT NULL default '', `objectType` varchar( 20 ) NOT NULL default '', `objectId` varchar(10) NOT NULL default '', `displayEachuser` char( 1 ) default NULL , PRIMARY KEY ( `groupName`,`objectType`,`objectId`) ) ENGINE=MyISAM ;
CREATE TABLE IF NOT EXISTS tiki_groupalert ( `groupName` varchar(255) NOT NULL default '', `objectType` varchar( 20 ) NOT NULL default '', `objectId` varchar(10) NOT NULL default '', `displayEachuser` char( 1 ) default NULL , PRIMARY KEY ( `groupName`,`objectType`,`objectId`) ) ENGINE=MyISAM ;
#bbenamran
# Create recurrence table on calendar items model, adding rules of recurrence
CREATE TABLE tiki_calendar_recurrence (
CREATE TABLE IF NOT EXISTS tiki_calendar_recurrence (
`recurrenceId` int(14) NOT NULL auto_increment,
`calendarId` int(14) NOT NULL default '0',
start int(4) NOT NULL default '0',
......
#2008-12-11 niclone
CREATE TABLE `tiki_sent_newsletters_files` (
CREATE TABLE IF NOT EXISTS `tiki_sent_newsletters_files` (
`id` int(11) NOT NULL auto_increment,
`editionId` int(11) NOT NULL,
`name` varchar(256) NOT NULL,
......
#2008-01-06 lphuberdeau
CREATE TABLE tiki_group_watches (
CREATE TABLE IF NOT EXISTS tiki_group_watches (
`watchId` int(12) NOT NULL auto_increment,
`group` varchar(200) NOT NULL default '',
event varchar(40) NOT NULL default '',
......
#sylvieg
CREATE TABLE `tiki_sefurl_regex_out` (
CREATE TABLE IF NOT EXISTS `tiki_sefurl_regex_out` (
`id` int(11) NOT NULL auto_increment,
`left` varchar(256) NOT NULL,
`right` varchar(256) NULL default NULL,
......
#2009-04-16 lphuberdeau
CREATE TABLE tiki_plugin_security (
CREATE TABLE IF NOT EXISTS tiki_plugin_security (
fingerprint VARCHAR(200) NOT NULL PRIMARY KEY,
status VARCHAR(10) NOT NULL,
approval_by VARCHAR(200) NULL,
......
CREATE TABLE tiki_perspectives (
CREATE TABLE IF NOT EXISTS tiki_perspectives (
`perspectiveId` int NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
PRIMARY KEY( `perspectiveId` )
) ENGINE=MyISAM;
CREATE TABLE tiki_perspective_preferences (
CREATE TABLE IF NOT EXISTS tiki_perspective_preferences (
`perspectiveId` int NOT NULL,
pref varchar(40) NOT NULL,
value text,
......
......@@ -2,7 +2,7 @@
INSERT INTO `users_permissions` (`permName`, `permDesc`, `level`, `type`, `admin`, `feature_check`) VALUES('tiki_p_trigger_transition', 'Can trigger the transition between two states', 'admin', 'transition', NULL, 'feature_group_transition,feature_category_transition');
CREATE TABLE `tiki_transitions` (
CREATE TABLE IF NOT EXISTS `tiki_transitions` (
`transitionId` int NOT NULL AUTO_INCREMENT,
`name` varchar(50),
`preserve` int(1) NOT NULL DEFAULT 0,
......
-- 2009-11-05 lphuberdeau
CREATE TABLE `tiki_auth_tokens` (
CREATE TABLE IF NOT EXISTS `tiki_auth_tokens` (
`tokenId` INT NOT NULL AUTO_INCREMENT,
`creation` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`timeout` INT NOT NULL DEFAULT 0,
......
DROP TABLE IF EXISTS `metrics_assigned`;
CREATE TABLE `metrics_assigned` (
CREATE TABLE IF NOT EXISTS `metrics_assigned` (
`assigned_id` int(11) NOT NULL AUTO_INCREMENT,
`metric_id` int(11) NOT NULL,
`tab_id` int(11) NOT NULL,
......@@ -10,7 +10,7 @@ CREATE TABLE `metrics_assigned` (
) ENGINE=MyISAM;
DROP TABLE IF EXISTS `metrics_metric`;
CREATE TABLE `metrics_metric` (
CREATE TABLE IF NOT EXISTS `metrics_metric` (
`metric_id` int(11) NOT NULL AUTO_INCREMENT,
`metric_name` varchar(255) NOT NULL,
`metric_range` varchar(1) NOT NULL DEFAULT '+' COMMENT 'values: + (daily), @ (monthly&weekly), - (weekly)',
......@@ -22,7 +22,7 @@ CREATE TABLE `metrics_metric` (
) ENGINE=MyISAM;
DROP TABLE IF EXISTS `metrics_tab`;
CREATE TABLE `metrics_tab` (
CREATE TABLE IF NOT EXISTS `metrics_tab` (
`tab_id` int(11) NOT NULL AUTO_INCREMENT,
`tab_name` varchar(255) NOT NULL,
`tab_order` int(11) NOT NULL DEFAULT '0',
......
CREATE TABLE `tiki_file_backlinks` (
CREATE TABLE IF NOT EXISTS `tiki_file_backlinks` (
`fileId` int(14) NOT NULL,
`objectId` int(12) NOT NULL,
KEY `objectId` (`objectId`),
......
CREATE TABLE `tiki_payment_requests` (
CREATE TABLE IF NOT EXISTS `tiki_payment_requests` (
`paymentRequestId` INT NOT NULL AUTO_INCREMENT,
`amount` DECIMAL(7,2) NOT NULL,
`amount_paid` DECIMAL(7,2) NOT NULL DEFAULT 0.0,
......@@ -12,7 +12,7 @@ CREATE TABLE `tiki_payment_requests` (
PRIMARY KEY( `paymentRequestId` )
) ENGINE=MyISAM;
CREATE TABLE `tiki_payment_received` (
CREATE TABLE IF NOT EXISTS `tiki_payment_received` (
`paymentReceivedId` INT NOT NULL AUTO_INCREMENT,
`paymentRequestId` INT NOT NULL,
`payment_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
......
CREATE TABLE `tiki_rss_items` (
CREATE TABLE IF NOT EXISTS `tiki_rss_items` (
`rssItemId` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`rssId` INT NOT NULL,
`guid` VARCHAR(255) NOT NULL,
......
CREATE TABLE `tiki_user_login_cookies` (
CREATE TABLE IF NOT EXISTS `tiki_user_login_cookies` (
`userId` INT NOT NULL,
`secret` CHAR(64) NOT NULL,
`expiration` TIMESTAMP NULL,
......
CREATE TABLE `tiki_object_attributes` (
CREATE TABLE IF NOT EXISTS `tiki_object_attributes` (
`attributeId` INT PRIMARY KEY AUTO_INCREMENT,
`type` varchar(50) NOT NULL,
`itemId` varchar(255) NOT NULL,
......
CREATE TABLE `tiki_rating_configs` (
CREATE TABLE IF NOT EXISTS `tiki_rating_configs` (
`ratingConfigId` INT PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL,
`expiry` INT NOT NULL DEFAULT 3600,
......@@ -6,7 +6,7 @@ CREATE TABLE `tiki_rating_configs` (
`callbacks` TEXT
) ENGINE=MyISAM;
CREATE TABLE `tiki_rating_obtained` (
CREATE TABLE IF NOT EXISTS `tiki_rating_obtained` (
`ratingId` INT PRIMARY KEY AUTO_INCREMENT,
`ratingConfigId` INT NOT NULL,
`type` VARCHAR(50) NOT NULL,
......
CREATE TABLE `tiki_object_relations` (
CREATE TABLE IF NOT EXISTS `tiki_object_relations` (
`relationId` INT PRIMARY KEY AUTO_INCREMENT,
`relation` varchar(25) NOT NULL,
`source_type` varchar(50) NOT NULL,
......
CREATE TABLE `tiki_tracker_item_field_logs` (
CREATE TABLE IF NOT EXISTS `tiki_tracker_item_field_logs` (
`version` int(12) NOT NULL,
`itemId` int(12) NOT NULL default '0',
`fieldId` int(12) NOT NULL default '0',
......
CREATE TABLE `tiki_discount`(
CREATE TABLE IF NOT EXISTS `tiki_discount`(
`id` INT NOT NULL AUTO_INCREMENT,
`code` VARCHAR(255),
`value` VARCHAR(255),
......
CREATE TABLE `tiki_todo` (
CREATE TABLE IF NOT EXISTS `tiki_todo` (
`todoId` INT(12) NOT NULL auto_increment,
`after` INT(12) NOT NULL,
`event` ENUM('creation', 'modification', 'upload'),
......@@ -10,7 +10,7 @@ CREATE TABLE `tiki_todo` (
KEY `what` (`objectType`, `objectId`),
KEY `after` (`after`)
) ENGINE=MyISAM;
CREATE TABLE `tiki_todo_notif` (
CREATE TABLE IF NOT EXISTS `tiki_todo_notif` (
`todoId` INT(12) NOT NULL,
`objectId` VARCHAR(255) default NULL,
KEY `todoId` (`todoId`),
......
DROP TABLE IF EXISTS `tiki_url_shortener`;
CREATE TABLE `tiki_url_shortener` (
CREATE TABLE IF NOT EXISTS `tiki_url_shortener` (
`urlId` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user` varchar(200) NOT NULL,
`longurl` tinytext NOT NULL,
......
CREATE TABLE `tiki_invit` (
CREATE TABLE IF NOT EXISTS `tiki_invit` (
`id` int(11) NOT NULL auto_increment,
`inviter` varchar(200) NOT NULL,
`groups` varchar(255) default NULL,
......@@ -10,7 +10,7 @@ CREATE TABLE `tiki_invit` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
CREATE TABLE `tiki_invited` (
CREATE TABLE IF NOT EXISTS `tiki_invited` (
`id` int(11) NOT NULL auto_increment,
`id_invit` int(11) NOT NULL,
`email` varchar(255) NOT NULL,
......
-- Undo previous patch - same day
DROP TABLE IF EXISTS `tiki_goal_events`;
CREATE TABLE `tiki_goal_events` (
CREATE TABLE IF NOT EXISTS `tiki_goal_events` (
`eventId` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`eventDate` INT NOT NULL,
`eventType` VARCHAR(50) NOT NULL,
......
......@@ -3,7 +3,7 @@
*/
# Keep track of h5p content entities > Pending in Tiki: Add FileId
CREATE TABLE tiki_h5p_contents (
CREATE TABLE IF NOT EXISTS tiki_h5p_contents (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
file_id INT UNSIGNED NOT NULL, # reference to the file gallery object in tiki_files table
created_at TIMESTAMP NULL,
......@@ -27,7 +27,7 @@ CREATE TABLE tiki_h5p_contents (
) ENGINE = MyISAM;
# Keep track of content dependencies
CREATE TABLE tiki_h5p_contents_libraries (
CREATE TABLE IF NOT EXISTS tiki_h5p_contents_libraries (
content_id INT UNSIGNED NOT NULL,
library_id INT UNSIGNED NOT NULL,
dependency_type VARCHAR(31) NOT NULL,
......@@ -39,7 +39,7 @@ CREATE TABLE tiki_h5p_contents_libraries (
# Keep track of h5p libraries
CREATE TABLE tiki_h5p_libraries (
CREATE TABLE IF NOT EXISTS tiki_h5p_libraries (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
created_at TIMESTAMP NULL,
updated_at TIMESTAMP NULL,
......@@ -63,7 +63,7 @@ CREATE TABLE tiki_h5p_libraries (
) ENGINE = MyISAM;
# Keep track of h5p library dependencies
CREATE TABLE tiki_h5p_libraries_libraries (
CREATE TABLE IF NOT EXISTS tiki_h5p_libraries_libraries (
library_id INT UNSIGNED NOT NULL,
required_library_id INT UNSIGNED NOT NULL,
dependency_type VARCHAR(31) NOT NULL,
......@@ -71,7 +71,7 @@ CREATE TABLE tiki_h5p_libraries_libraries (
) ENGINE = MyISAM;
# Keep track of h5p library translations
CREATE TABLE tiki_h5p_libraries_languages (
CREATE TABLE IF NOT EXISTS tiki_h5p_libraries_languages (
library_id INT UNSIGNED NOT NULL,
language_code VARCHAR(31) NOT NULL,
translation TEXT NOT NULL,
......@@ -79,7 +79,7 @@ CREATE TABLE tiki_h5p_libraries_languages (
) ENGINE = MyISAM;
# Keep track of temporary files uploaded in editor before saving content
CREATE TABLE tiki_h5p_tmpfiles (
CREATE TABLE IF NOT EXISTS tiki_h5p_tmpfiles (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
path VARCHAR(255) NOT NULL,
created_at INT UNSIGNED NOT NULL,
......@@ -89,7 +89,7 @@ CREATE TABLE tiki_h5p_tmpfiles (
) ENGINE = MyISAM;
# Keep track of results (contents >-< users) -> Reusing Action log in Tiki?
CREATE TABLE tiki_h5p_results (
CREATE TABLE IF NOT EXISTS tiki_h5p_results (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
content_id INT UNSIGNED NOT NULL,
user_id INT UNSIGNED NOT NULL,
......@@ -103,7 +103,7 @@ CREATE TABLE tiki_h5p_results (
) ENGINE = MyISAM;
# Cache table for h5p libraries so we can reuse the existing h5p code for caching
CREATE TABLE tiki_h5p_libraries_cachedassets (
CREATE TABLE IF NOT EXISTS tiki_h5p_libraries_cachedassets (
library_id INT UNSIGNED NOT NULL,
hash VARCHAR(64) NOT NULL,
PRIMARY KEY (library_id, hash)
......
CREATE TABLE `tiki_custom_route` (
CREATE TABLE IF NOT EXISTS `tiki_custom_route` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`description` varchar(255) NULL,
`type` varchar(255) NOT NULL,
......
CREATE TABLE tiki_h5p_libraries_hub_cache (
CREATE TABLE IF NOT EXISTS tiki_h5p_libraries_hub_cache (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
machine_name VARCHAR(127) NOT NULL,
major_version INT UNSIGNED NOT NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment