Skip to content

Commit

Permalink
ref data script and migration for mrd (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
will-craig authored Oct 17, 2023
1 parent 645c7ba commit bb3e750
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions RefData/Migrations/20231016150635_update_family_law_case_names.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace RefData.Migrations
{
public partial class update_family_law_case_names : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
SqlFileHelper.RunSqlFile("data/10181_update_family_law_case_type_names.sql", migrationBuilder);
}

protected override void Down(MigrationBuilder migrationBuilder)
{

}
}
}
13 changes: 13 additions & 0 deletions RefData/data/10181_update_family_law_case_type_names.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
SET XACT_ABORT ON;
GO;

BEGIN TRANSACTION

UPDATE Conference SET CaseType = 'Family Public Law' WHERE CaseType = 'Public Law - Care'
UPDATE Conference SET CaseType = 'Family Private Law' WHERE CaseType = 'Private Law'

SELECT * FROM Conference WHERE CaseType = 'Family Public Law' OR CaseType = 'Family Private Law'

COMMIT
SET XACT_ABORT OFF
GO;

0 comments on commit bb3e750

Please sign in to comment.