mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 02:34:21 +00:00
chore(db): number the ski options migration after the Tours default
This commit is contained in:
+2
-2
@@ -10,8 +10,8 @@ import { Migration } from '@mikro-orm/migrations';
|
||||
* can be offered instead of applied. A tour kept in a collection keeps the
|
||||
* same column, so a copy made from it is planned as the tour it was saved from.
|
||||
*/
|
||||
export class Migration20200101046140_a_ski_tour_keeps_its_piste_router_options extends Migration {
|
||||
override name = 'Migration20200101046140_a_ski_tour_keeps_its_piste_router_options';
|
||||
export class Migration20200101046150_a_ski_tour_keeps_its_piste_router_options extends Migration {
|
||||
override name = 'Migration20200101046150_a_ski_tour_keeps_its_piste_router_options';
|
||||
|
||||
override up(): void {
|
||||
this.addSql('ALTER TABLE tours ADD COLUMN ski_options TEXT');
|
||||
@@ -81,7 +81,7 @@ const UNNUMBERED = [
|
||||
'Migration20200101046120_a_wanderer_connection_can_watch_its_sources',
|
||||
'Migration20200101046130_snowshoeing_and_winter_hiking_are_ski_disciplines',
|
||||
'Migration20200101046140_tours_are_on_for_every_install',
|
||||
'Migration20200101046140_a_ski_tour_keeps_its_piste_router_options',
|
||||
'Migration20200101046150_a_ski_tour_keeps_its_piste_router_options',
|
||||
];
|
||||
// The last step the positional runner ever had; planLegacyBaseline refuses a
|
||||
// schema_version past it.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* `Migration20200101046140_a_ski_tour_keeps_its_piste_router_options` gives a
|
||||
* `Migration20200101046150_a_ski_tour_keeps_its_piste_router_options` gives a
|
||||
* tour one more column, `ski_options`: the JSON text of the piste router's
|
||||
* options and the build its legs ran on. Every tour that was there keeps its
|
||||
* columns and reads NULL in the new one; the column takes the server's JSON.
|
||||
@@ -9,7 +9,7 @@ import { createMigrationOrm, migrateTo, pendingNames, rawExec, rawQuery } from '
|
||||
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
const TARGET = 'Migration20200101046140_a_ski_tour_keeps_its_piste_router_options';
|
||||
const TARGET = 'Migration20200101046150_a_ski_tour_keeps_its_piste_router_options';
|
||||
|
||||
describe('the ski options column', () => {
|
||||
it('TOURSKIOPT-001: adds a nullable column, leaves every tour as it was and takes the JSON the server writes', async () => {
|
||||
|
||||
Reference in New Issue
Block a user