Skip to content

Instantly share code, notes, and snippets.

@kebien6020
Created August 12, 2017 00:20
Show Gist options
  • Save kebien6020/49269121be6f3c71aa6ccbee2e196d93 to your computer and use it in GitHub Desktop.
Save kebien6020/49269121be6f3c71aa6ccbee2e196d93 to your computer and use it in GitHub Desktop.
queryInterface.createTable('actions', {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true
},
system_id: {
type: Sequelize.STRING,
},
rule_id: {
type: Sequelize.STRING,
},
plan_id: {
type: Sequelize.INTEGER,
unique: 'actions_unique',
}
}, {
uniqueKeys: {
actions_unique: {
fields: ['system_id', 'rule_id', 'plan_id']
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment