diff --git a/api/src/database/migrations/run.ts b/api/src/database/migrations/run.ts index 58a1af398b..85003aafdf 100644 --- a/api/src/database/migrations/run.ts +++ b/api/src/database/migrations/run.ts @@ -26,6 +26,11 @@ export default async function run(database: Knex, direction: 'up' | 'down' | 'la ...customMigrationFiles.map((path) => parseFilePath(path, true)), ].sort((a, b) => (a.version > b.version ? 1 : -1)); + const migrationKeys = new Set(migrations.map((m) => m.version)); + if (migrations.length > migrationKeys.size) { + throw new Error('Migration keys collide! Please ensure that every migration uses a unique key.'); + } + function parseFilePath(filePath: string, custom = false) { const version = filePath.split('-')[0]; const name = formatTitle(filePath.split('-').slice(1).join('_').split('.')[0]); diff --git a/docs/guides/users.md b/docs/guides/users.md index 5e23390d3d..dc3522dda9 100644 --- a/docs/guides/users.md +++ b/docs/guides/users.md @@ -14,8 +14,8 @@ 1. Navigate to the **User Library** 2. Click the **Invite Users** button in the header -4. Enter **one or more email addresses**, separated by new lines, in the modal -5. Click **Invite** +3. Enter **one or more email addresses**, separated by new lines, in the modal +4. Click **Invite** At this point the invited user(s) will receive an email with a link to the App where they set a password and enable their account.