Niharika29 has uploaded a new change for review. https://gerrit.wikimedia.org/r/186142
Change subject: Add a campaigns table to hold data about current and previous rounds ...................................................................... Add a campaigns table to hold data about current and previous rounds Bug: T87299 Change-Id: I2b502ebf8bb1d352f234ae9a72ff22eeda353da5 --- A data/db/migrations/20152101-add-campaigns-table.sql M data/db/schema.mysql 2 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/iegreview refs/changes/42/186142/1 diff --git a/data/db/migrations/20152101-add-campaigns-table.sql b/data/db/migrations/20152101-add-campaigns-table.sql new file mode 100644 index 0000000..8c14f42 --- /dev/null +++ b/data/db/migrations/20152101-add-campaigns-table.sql @@ -0,0 +1,15 @@ +-- Create a campaigns table to hold a record of past and previous campaigns +-- Bug: T87299 + +DROP TABLE IF EXISTS campaigns; + +CREATE TABLE IF NOT EXISTS campaigns ( + id INT(11) NOT NULL AUTO_INCREMENT + , name VARCHAR(255) NOT NULL + , created_by INT(11) + , created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + , campaign_status TINYINT(1) DEFAULT 0 + , start_date TIMESTAMP NOT NULL + , end_date TIMESTAMP NOT NULL + , PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 ; \ No newline at end of file diff --git a/data/db/schema.mysql b/data/db/schema.mysql index 68ad91b..adb813e 100644 --- a/data/db/schema.mysql +++ b/data/db/schema.mysql @@ -61,3 +61,14 @@ , CONSTRAINT FOREIGN KEY (proposal) REFERENCES proposals(id) ON DELETE CASCADE , CONSTRAINT FOREIGN KEY (reviewer) REFERENCES users(id) ON DELETE RESTRICT ) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 ; + +CREATE TABLE IF NOT EXISTS campaigns ( + id INT(11) NOT NULL AUTO_INCREMENT + , name VARCHAR(255) NOT NULL + , created_by INT(11) + , created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + , campaign_status TINYINT(1) DEFAULT 0 + , start_date TIMESTAMP NOT NULL + , end_date TIMESTAMP NOT NULL + , PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 ; \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/186142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b502ebf8bb1d352f234ae9a72ff22eeda353da5 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/iegreview Gerrit-Branch: master Gerrit-Owner: Niharika29 <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
