-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added hex_colour column to data_groups table (#56)
- Loading branch information
Showing
3 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
|
||
await queryInterface.sequelize.query( | ||
`CREATE TABLE data_groups ( | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.sequelize.query( | ||
`CREATE TABLE data_groups ( | ||
iddata_groups INT NOT NULL AUTO_INCREMENT, | ||
title VARCHAR(45) NOT NULL, | ||
PRIMARY KEY (iddata_groups) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1` | ||
); | ||
|
||
}, | ||
async down(queryInterface, Sequelize) { | ||
await queryInterface.sequelize.query(`DROP TABLE data_groups`); | ||
} | ||
}; | ||
); | ||
}, | ||
async down(queryInterface, Sequelize) { | ||
await queryInterface.sequelize.query(`DROP TABLE data_groups`); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"use strict"; | ||
|
||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.sequelize.query( | ||
`ALTER TABLE data_groups | ||
ADD hex_colour VARCHAR(7) DEFAULT NULL;` | ||
); | ||
}, | ||
async down(queryInterface, Sequelize) { | ||
await queryInterface.sequelize.query( | ||
`ALTER TABLE data_groups | ||
DROP hex_colour;` | ||
); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters