UNPKG

@ibernoh/arkanjs

Version:

Backend API generator with RBAC, CLI scaffolding, and built-in structure. Just install and run.

24 lines (22 loc) 676 B
export async function up(queryInterface, Sequelize) { await queryInterface.createTable("role_permissions", { id: { type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true }, role_id: { type: Sequelize.INTEGER, allowNull: false, references: { model: "roles", key: "id" }, onDelete: "CASCADE" }, permission_id: { type: Sequelize.INTEGER, allowNull: false, references: { model: "permissions", key: "id" }, onDelete: "CASCADE" }, created_at: Sequelize.DATE, updated_at: Sequelize.DATE }); } export async function down(queryInterface) { await queryInterface.dropTable("role_permissions"); }