ERROR: SQLITE_ERROR: no such table: story

Viewed 15

This is what i get in my console:

C:\scrumboard-praktikant>npx sequelize-cli db:migrate

Sequelize CLI [Node: 16.17.0, CLI: 6.4.1, ORM: 5.22.5]

Loaded configuration file "config\config.json".
Using environment "development".
== 20210622124450-modify_story_add_storyNumber: migrating =======

ERROR: SQLITE_ERROR: no such table: story

This is my config file:

{
  "development": {
    "database": "localDB",
    "dialect": "sqlite",
    "redBotStoryStateUrl": "http://localhost:5000/storystate?",
    "address": "http://localhost:3001",
    "refreshStateAllMs": 10000,
    "listenOnPort": 3001,
    "checkStoryState": false
  },
  "production": {
    "username": "scrumboard",
    "database": "scrumboard",
    "host": "127.0.0.1",
    "password": "scrumboard",
    "dialect": "mysql",
    "redBotStoryStateUrl": "http://localhost:5000/storystate?",
    "address": "http://localhost:3001",
    "refreshStateAllMs": 10000,
    "listenOnPort": 5001,
    "checkStoryState": true,
    "mysqlDump": "C:\\Program Files\\MySQL\\MySQL Workbench 8.0 CE\\mysqldump.exe",
    "directory": "C:\\scrumboard_dbbackup"
  }
}

This is my 20210622124450-modify_story_add_storyNumber file:

'use strict';

module.exports = {
  up: (queryInterface, Sequelize) => {

    return queryInterface.addColumn('story', 'storyNumber', {
      type: Sequelize.STRING, allowNull: true,
    })
  },

  down: (queryInterface, Sequelize) => {
    return queryInterface.removeColumn('story', 'storyNumber')
  }
};

How can i fix the Error i get? When i use npm start everything works fine, but i cant migrate the files anyways. The program itself creates tables when i use npm start, they aren't premade in mysql.

0 Answers
Related