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>
56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
"use strict";
|
|
|
|
/** @type {import('sequelize-cli').Migration} */
|
|
module.exports = {
|
|
async up(queryInterface, Sequelize) {
|
|
await queryInterface.sequelize.transaction(async (transaction) => {
|
|
await queryInterface.addColumn(
|
|
"apiKeys",
|
|
"hash",
|
|
{
|
|
type: Sequelize.STRING,
|
|
allowNull: true,
|
|
unique: true,
|
|
},
|
|
{ transaction }
|
|
);
|
|
|
|
await queryInterface.addColumn(
|
|
"apiKeys",
|
|
"last4",
|
|
{
|
|
type: Sequelize.STRING(4),
|
|
allowNull: true,
|
|
},
|
|
{ transaction }
|
|
);
|
|
|
|
await queryInterface.changeColumn(
|
|
"apiKeys",
|
|
"secret",
|
|
{
|
|
type: Sequelize.STRING,
|
|
allowNull: true,
|
|
},
|
|
{ transaction }
|
|
);
|
|
});
|
|
},
|
|
|
|
async down(queryInterface, Sequelize) {
|
|
await queryInterface.sequelize.transaction(async (transaction) => {
|
|
await queryInterface.removeColumn("apiKeys", "hash", { transaction });
|
|
await queryInterface.removeColumn("apiKeys", "last4", { transaction });
|
|
await queryInterface.changeColumn(
|
|
"apiKeys",
|
|
"secret",
|
|
{
|
|
type: Sequelize.STRING,
|
|
allowNull: false,
|
|
},
|
|
{ transaction }
|
|
);
|
|
});
|
|
},
|
|
};
|