mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +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>
27 lines
635 B
JavaScript
27 lines
635 B
JavaScript
module.exports = {
|
|
up: async (queryInterface, Sequelize) => {
|
|
const [teams, metaData] =
|
|
await queryInterface.sequelize.query(`SELECT * FROM teams`);
|
|
|
|
const teamIds = teams.map((team) => team.id);
|
|
await Promise.all(
|
|
teamIds.map(async (teamId) => {
|
|
await queryInterface.sequelize.query(`
|
|
update users
|
|
set "isAdmin" = true
|
|
where id in (
|
|
select id
|
|
from users
|
|
where "teamId" = '${teamId}'
|
|
order by "createdAt" asc
|
|
limit 1
|
|
);
|
|
`);
|
|
})
|
|
);
|
|
},
|
|
down: async (queryInterface, Sequelize) => {
|
|
// no-op
|
|
},
|
|
};
|