-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
2,011 additions
and
1,241 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Migration } from '@mikro-orm/migrations'; | ||
|
||
export class Migration20241219124504 extends Migration { | ||
public async up(): Promise<void> { | ||
|
||
this.addSql('alter table "importvorgang" rename column "import_by_person_id" to "person_id";'); | ||
|
||
this.addSql( | ||
'alter table "importvorgang" add constraint "importvorgang_person_id_foreign" foreign key ("person_id") references "person" ("id") on update cascade on delete set null;', | ||
); | ||
this.addSql( | ||
'alter table "importvorgang" add constraint "importvorgang_rolle_id_foreign" foreign key ("rolle_id") references "rolle" ("id") on update cascade on delete set null;', | ||
); | ||
this.addSql( | ||
'alter table "importvorgang" add constraint "importvorgang_organisation_id_foreign" foreign key ("organisation_id") references "organisation" ("id") on update cascade on delete set null;', | ||
); | ||
} | ||
|
||
public override async down(): Promise<void> { | ||
|
||
this.addSql('alter table "importvorgang" drop constraint "importvorgang_person_id_foreign";'); | ||
this.addSql('alter table "importvorgang" drop constraint "importvorgang_rolle_id_foreign";'); | ||
this.addSql('alter table "importvorgang" drop constraint "importvorgang_organisation_id_foreign";'); | ||
this.addSql('alter table "importvorgang" rename column "person_id" to "import_by_person_id";'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Migration } from '@mikro-orm/migrations'; | ||
|
||
export class Migration20250104001707 extends Migration { | ||
public async up(): Promise<void> { | ||
this.addSql("create type \"import_data_item_status_enum\" as enum ('FAILED', 'SUCCESS', 'PENDING');"); | ||
this.addSql('alter table "importdataitem" add column "status" "import_data_item_status_enum" not null;'); | ||
} | ||
|
||
public override async down(): Promise<void> { | ||
this.addSql('alter table "importdataitem" drop column "data_item_status";'); | ||
|
||
this.addSql('drop type "import_data_item_status_enum";'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.