adding integration with payment sources table and within stripe controller

This commit is contained in:
Arjun Patel
2019-05-11 03:27:30 -07:00
parent f865781c07
commit 3c55717dda
6 changed files with 187 additions and 7 deletions
@@ -0,0 +1,37 @@
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('payment_sources', {
id: {
allowNull: false,
primaryKey: true,
type: Sequelize.UUID
},
token: {
type: Sequelize.STRING
},
provider: {
type: Sequelize.STRING
},
donor_id: {
type: Sequelize.UUID,
allowNull: false,
references: {
model: 'donors',
key: 'id'
}
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('PaymentSources');
}
};