Commit 6325c49c authored by Carsten  Rose's avatar Carsten Rose
Browse files

Create new file customTables.sql. Move 'Period' from formEditor.sql to customTables.sql

parent f8e1dc5f
Pipeline #1376 passed with stage
in 2 minutes and 10 seconds
This diff is collapsed.
......@@ -132,6 +132,11 @@ class DatabaseUpdate {
// Finally write the latest version number.
$this->setDatabaseVersion($new);
}
if ($old === false) {
// A complete new installation get's some extra tables
$this->db->playSqlFile(__DIR__ . '/../../sql/customTable.sql');
}
}
/**
......
CREATE TABLE IF NOT EXISTS `Period`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`start` DATETIME NOT NULL,
`name` VARCHAR(255) NOT NULL,
`modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
`created` DATETIME NOT NULL,
PRIMARY KEY (`id`),
KEY `start` (`start`)
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8
AUTO_INCREMENT = 0;
# Default record for table Period
INSERT INTO Period (start, name, created)
VALUES (NOW(), 'dummy', NOW());
......@@ -149,22 +149,6 @@ CREATE TABLE IF NOT EXISTS `Dirty`
DEFAULT CHARSET = utf8
AUTO_INCREMENT = 0;
CREATE TABLE IF NOT EXISTS `Period`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`start` DATETIME NOT NULL,
`name` VARCHAR(255) NOT NULL,
`modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
`created` DATETIME NOT NULL,
PRIMARY KEY (`id`),
KEY `start` (`start`)
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8
AUTO_INCREMENT = 0;
# Delete previous FormElements (if exist) of system forms
DELETE FormElement
FROM FormElement,
......@@ -392,7 +376,8 @@ VALUES
(2, 'tabindex', 'tabindex', 'show', 'text', 'all', 'native', 350, 0, 0,
'<a href="{{documentation:Y}}#field-tabindex">Info</a>', '', '', '', '', 101, '', 'no', '', '', '', '', '',
'specialchar'),
(2, 'adminNote', 'Internal Note', 'show', 'text', 'all', 'native', 360, '60,4', 0, '', '', '', '', '', 101, '', 'no', '', '',
(2, 'adminNote', 'Internal Note', 'show', 'text', 'all', 'native', 360, '60,4', 0, '', '', '', '', '', 101, '', 'no',
'', '',
'', '', '', 'specialchar'),
(2, 'labelAlign', 'Label Align', 'show', 'radio', 'all', 'native', 400, 0, 0,
......@@ -536,10 +521,6 @@ VALUES
'{{!SELECT fe.id AS id, {{formId:P}} AS formId FROM FormElement AS fe WHERE fe.formId={{id:P}} ORDER BY fe.ord}}',
'recordDestinationTable=FormElement\ntranslateIdColumn=feIdContainer');
# Default record for table Period
INSERT INTO Period (start, name, created)
VALUES (NOW(), 'dummy', NOW());
# AutoCRON
CREATE TABLE IF NOT EXISTS `Cron`
(
......@@ -625,3 +606,4 @@ CREATE TABLE IF NOT EXISTS `Split`
ENGINE = InnoDB
AUTO_INCREMENT = 0
DEFAULT CHARSET = utf8;
Supports Markdown
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