From 01e6a5e6b26561e41bb6cfa92c20cd7384e9472e Mon Sep 17 00:00:00 2001 From: Jonathan Labreuille Date: Wed, 28 Oct 2015 12:46:27 +0100 Subject: [PATCH] forms table --- lib/Config/Migrator.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/Config/Migrator.php b/lib/Config/Migrator.php index 7ed64e4cff..89cabc4303 100644 --- a/lib/Config/Migrator.php +++ b/lib/Config/Migrator.php @@ -21,6 +21,7 @@ class Migrator { 'subscriber_custom_field', 'newsletter_option_fields', 'newsletter_option', + 'forms' ); } @@ -193,6 +194,20 @@ class Migrator { return $this->sqlify(__FUNCTION__, $attributes); } + function forms() { + $attributes = array( + 'id mediumint(9) NOT NULL AUTO_INCREMENT,', + 'name varchar(90) NOT NULL,', + 'body longtext,', + 'created_at TIMESTAMP NOT NULL DEFAULT 0,', + 'deleted_at TIMESTAMP NULL DEFAULT NULL,', + 'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,', + 'PRIMARY KEY (id),', + 'UNIQUE KEY name (name)' + ); + return $this->sqlify(__FUNCTION__, $attributes); + } + private function sqlify($model, $attributes) { $table = $this->prefix . $model;