showing results for - "references another schema in sequelize"
Janelle
06 Apr 2020
1queryInterface.createTable(
2          "MyTable",
3          {
4            id: {
5              type: Sequelize.INTEGER,
6              primaryKey: true,
7              autoIncrement: true,
8            },
9            SomeTableId: {
10              type: Sequelize.INTEGER,
11              references: {
12                model: {
13                  tableName: "SomeTable",
14                  schema: "static",
15                },
16                key: "id",
17              },
18              allowNull: false,
19            },
20          },
21          t
22        );