mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
97f8d0f265
* Separate Prettier and ESLint according to best practices - Create standalone .prettierrc configuration file - Remove eslint-plugin-prettier integration from ESLint config - Replace with eslint-config-prettier to disable conflicting rules - Remove eslint-plugin-prettier dependency - Add dedicated format and format:check scripts - Update lint-staged to run Prettier and ESLint separately - Format entire codebase with new Prettier configuration This follows the recommended approach from Prettier documentation: https://prettier.io/docs/integrating-with-linters#notes * Remove test comment --------- Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
"use strict";
|
|
|
|
/** @type {import('sequelize-cli').Migration} */
|
|
module.exports = {
|
|
async up(queryInterface) {
|
|
await queryInterface.sequelize.transaction(async (transaction) => {
|
|
await queryInterface.removeConstraint(
|
|
"user_permissions",
|
|
"user_permissions_createdById_fkey",
|
|
{ transaction }
|
|
);
|
|
await queryInterface.addConstraint("user_permissions", {
|
|
fields: ["createdById"],
|
|
name: "user_permissions_createdById_fkey",
|
|
type: "foreign key",
|
|
onDelete: "cascade",
|
|
references: {
|
|
table: "users",
|
|
field: "id",
|
|
},
|
|
transaction,
|
|
});
|
|
});
|
|
},
|
|
|
|
async down(queryInterface) {
|
|
await queryInterface.sequelize.transaction(async (transaction) => {
|
|
await queryInterface.removeConstraint(
|
|
"user_permissions",
|
|
"user_permissions_createdById_fkey",
|
|
{ transaction }
|
|
);
|
|
await queryInterface.addConstraint("user_permissions", {
|
|
fields: ["createdById"],
|
|
name: "user_permissions_createdById_fkey",
|
|
type: "foreign key",
|
|
onDelete: "set null",
|
|
references: {
|
|
table: "users",
|
|
field: "id",
|
|
},
|
|
transaction,
|
|
});
|
|
});
|
|
},
|
|
};
|