Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
intrn(migration): generalize the naming of table
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Oct 14, 2022
1 parent fccede2 commit 777739b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
await queryInterface.sequelize.transaction(async transaction => {
try {
const HASH_LENGTH = 64
await queryInterface.createTable("AsynchronousReports", {
await queryInterface.createTable("AsynchronousFiles", {
"id": {
"allowNull": false,
"autoIncrement": true,
Expand Down Expand Up @@ -64,7 +64,7 @@ module.exports = {
}
}, { transaction })

await queryInterface.addConstraint("AsynchronousReports", {
await queryInterface.addConstraint("AsynchronousFiles", {
"fields": [ "origin", "token" ],
"type": "unique",
"name": "unique_key_origin_token_constraint",
Expand All @@ -79,7 +79,7 @@ module.exports = {
async down(queryInterface, unusedSequelize) {
await queryInterface.sequelize.transaction(async transaction => {
try {
await queryInterface.dropTable("AsynchronousReports", { transaction })
await queryInterface.dropTable("AsynchronousFiles", { transaction })
} catch (err) {
await transaction.rollback()
throw err
Expand Down

0 comments on commit 777739b

Please sign in to comment.