Commit 512ab6d3 authored by KR Moorhouse's avatar KR Moorhouse

Reverted removal of columns from Forms table.

parent 59db5b2c
......@@ -17,6 +17,9 @@ _**nf3_forms**_ (Table of individual Forms)
* title (The displayable title of the Form)
* longtext
* COLLATE DATABASE_DEFAULT
* key (The administrative key of the Form)
* longtext
* COLLATE DATABASE_DEFAULT
* created_at (The date/time the Form was created)
* timestamp
* NOT NULL
......@@ -24,6 +27,10 @@ _**nf3_forms**_ (Table of individual Forms)
* ON UPDATE CURRENT_TIMESTAMP
* updated_at (The date/time the Form was last updated)
* datetime
* views (The number of times the Form has been viewed)
* int(11)
* subs (The Form's number of lifetime Submissions)
* int(11)
* form_title (The displayable title of the Form)
* longtext
* COLLATE utf8mb4_general_ci (fallback to utf8_general_ci)
......@@ -610,14 +617,6 @@ Updated forms tables
### Forms
_**nf3_forms**_ (Table of individual Forms)
REMOVED:
* key (The administrative key of the Form)
* longtext
* COLLATE DATABASE_DEFAULT
* views (The number of times the Form has been viewed)
* int(11)
* subs (The Form's number of lifetime Submissions)
* int(11)
ADDED:
* form_title (The displayable title of the Form)
* longtext
......
......@@ -15,8 +15,11 @@ class NF_Database_Migrations_Forms extends NF_Abstracts_Migration
$query = "CREATE TABLE IF NOT EXISTS {$this->table_name()} (
`id` int NOT NULL AUTO_INCREMENT,
`title` longtext,
`key` longtext,
`created_at` TIMESTAMP,
`updated_at` DATETIME,
`views` int(11),
`subs` int(11),
`form_title` longtext,
`default_label_pos` varchar(15),
`show_title` bit,
......@@ -35,10 +38,15 @@ class NF_Database_Migrations_Forms extends NF_Abstracts_Migration
*/
public function do_stage_one()
{
$query = "ALTER TABLE {$this->table_name()}
/**
* TODO:
*
DROP `key`,
DROP `views`,
DROP `subs`,
*
*/
$query = "ALTER TABLE {$this->table_name()}
ADD `form_title` longtext {$this->collate()},
ADD `default_label_pos` varchar(15) {$this->collate()},
ADD `show_title` bit,
......
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