Skip to content

Commit

Permalink
Merge pull request #2185 from NMDSdevopsServiceAdm/test
Browse files Browse the repository at this point in the history
Merge changes from Staging into Live for preprod deployment
  • Loading branch information
aaron-russell authored Jun 1, 2020
2 parents 48b0eec + ecacad9 commit 6800f41
Show file tree
Hide file tree
Showing 66 changed files with 2,974 additions and 197 deletions.
5 changes: 5 additions & 0 deletions .sequelizerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const path = require('path');

module.exports = {
'config': path.resolve('./server/config', 'sequelize.js')
}
60 changes: 60 additions & 0 deletions migrations/20200519170545-create_approvals_table.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
'use strict';

module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('Approvals', {
ID: {
type: Sequelize.DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
UUID: {
type: Sequelize.DataTypes.UUID,
unique: true,
allowNull: false,
},
EstablishmentID: {
type: Sequelize.DataTypes.INTEGER,
references: {
model: {
tableName: 'Establishment',
schema: 'cqc'
},
key: 'EstablishmentID'
},
allowNull: false
},
UserID: {
type: Sequelize.DataTypes.INTEGER,
references: {
model: {
tableName: 'User',
schema: 'cqc'
},
key: 'RegistrationID'
},
allowNull: false
},
ApprovalType: Sequelize.DataTypes.ENUM(['BecomeAParent']),
Status: Sequelize.DataTypes.ENUM(['Pending', 'Approved', 'Rejected']),
RejectionReason: {
type: Sequelize.DataTypes.TEXT,
allowNull: true,
},
Data: {
type: Sequelize.DataTypes.JSON,
allowNull: true,
},
createdAt: Sequelize.DataTypes.DATE,
updatedAt: Sequelize.DataTypes.DATE,
}, {
schema: 'cqc'
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable({
tableName: 'Approvals',
schema: 'cqc',
});
}
}
Loading

0 comments on commit 6800f41

Please sign in to comment.