mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
561c3d22e9
* fix: Added indices and primary key as recommended by dbcritic
26 lines
643 B
JavaScript
26 lines
643 B
JavaScript
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE feature_tag
|
|
DROP CONSTRAINT feature_tag_feature_name_tag_type_tag_value_key;
|
|
ALTER TABLE feature_tag
|
|
ADD PRIMARY KEY (feature_name, tag_type, tag_value);
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql(
|
|
`ALTER TABLE feature_tag
|
|
DROP constraint feature_tag_pkey;
|
|
ALTER TABLE feature_tag
|
|
ADD CONSTRAINT feature_tag_feature_name_tag_type_tag_value_key UNIQUE (feature_name, tag_type, tag_value)`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports._meta = {
|
|
version: 1,
|
|
};
|