Browse Source
* PM-23030 adding migration script * PM-23030 fixing store procedure sql file * PM-23030 fixing syntax error * PM-23030 fixing migration * PM-23030 fixing sql script * PM-23030 fixing migration order * PM_23030 fixing migrations * PM-23030 fixing migration script validation error * PM-23030 fixing migration * PM-23030 trying to fix validation error * PM-23030 fixing migration script * PM-23030 updating sql scripts to change data type * PM-23030 adding report key to organization application * PM-23030 adding report key migration scripts * PM-23030 adding migration scripts * PM-23030 changing key column namepull/6023/head
23 changed files with 19883 additions and 12 deletions
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
IF COL_LENGTH('[dbo].[OrganizationReport]', 'ContentEncryptionKey') IS NULL |
||||
BEGIN |
||||
ALTER TABLE [dbo].[OrganizationReport] |
||||
ADD [ContentEncryptionKey] VARCHAR(MAX) NOT NULL; |
||||
END |
||||
GO |
||||
|
||||
CREATE OR ALTER VIEW [dbo].[OrganizationReportView] |
||||
AS |
||||
SELECT |
||||
* |
||||
FROM |
||||
[dbo].[OrganizationReport] |
||||
GO |
||||
|
||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationReport_Create] |
||||
@Id UNIQUEIDENTIFIER OUTPUT, |
||||
@OrganizationId UNIQUEIDENTIFIER, |
||||
@Date DATETIME2(7), |
||||
@ReportData NVARCHAR(MAX), |
||||
@CreationDate DATETIME2(7), |
||||
@ContentEncryptionKey VARCHAR(MAX) |
||||
AS |
||||
SET NOCOUNT ON; |
||||
|
||||
INSERT INTO [dbo].[OrganizationReport] |
||||
( |
||||
[Id], |
||||
[OrganizationId], |
||||
[Date], |
||||
[ReportData], |
||||
[CreationDate], |
||||
[ContentEncryptionKey] |
||||
) |
||||
VALUES |
||||
( |
||||
@Id, |
||||
@OrganizationId, |
||||
@Date, |
||||
@ReportData, |
||||
@CreationDate, |
||||
@ContentEncryptionKey |
||||
); |
||||
GO |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
IF COL_LENGTH('[dbo].[OrganizationApplication]', 'ContentEncryptionKey') IS NULL |
||||
BEGIN |
||||
ALTER TABLE [dbo].[OrganizationApplication] |
||||
ADD [ContentEncryptionKey] VARCHAR(MAX) NOT NULL; |
||||
END |
||||
GO |
||||
|
||||
CREATE OR ALTER VIEW [dbo].[OrganizationApplicationView] |
||||
AS |
||||
SELECT |
||||
* |
||||
FROM |
||||
[dbo].[OrganizationApplication] |
||||
GO |
||||
|
||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_Create] |
||||
@Id UNIQUEIDENTIFIER OUTPUT, |
||||
@OrganizationId UNIQUEIDENTIFIER, |
||||
@Applications NVARCHAR(MAX), |
||||
@CreationDate DATETIME2(7), |
||||
@RevisionDate DATETIME2(7), |
||||
@ContentEncryptionKey VARCHAR(MAX) |
||||
AS |
||||
SET NOCOUNT ON; |
||||
|
||||
INSERT INTO [dbo].[OrganizationApplication] |
||||
( |
||||
[Id], |
||||
[OrganizationId], |
||||
[Applications], |
||||
[CreationDate], |
||||
[RevisionDate], |
||||
[ContentEncryptionKey] |
||||
) |
||||
VALUES |
||||
( |
||||
@Id, |
||||
@OrganizationId, |
||||
@Applications, |
||||
@CreationDate, |
||||
@RevisionDate, |
||||
@ContentEncryptionKey |
||||
); |
||||
GO |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace Bit.MySqlMigrations.Migrations; |
||||
|
||||
/// <inheritdoc /> |
||||
public partial class _20250626_00_AlterOrganizationReportsql : Migration |
||||
{ |
||||
/// <inheritdoc /> |
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<string>( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationReport", |
||||
type: "longtext", |
||||
nullable: false) |
||||
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
||||
migrationBuilder.AddColumn<string>( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationApplication", |
||||
type: "longtext", |
||||
nullable: false) |
||||
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
} |
||||
|
||||
/// <inheritdoc /> |
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationReport"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationApplication"); |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace Bit.MySqlMigrations.Migrations; |
||||
|
||||
/// <inheritdoc /> |
||||
public partial class _20250701_00_AlterOrganizationApplicationsql : Migration |
||||
{ |
||||
/// <inheritdoc /> |
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
|
||||
} |
||||
|
||||
/// <inheritdoc /> |
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
|
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace Bit.PostgresMigrations.Migrations; |
||||
|
||||
/// <inheritdoc /> |
||||
public partial class _20250626_00_AlterOrganizationReportsql : Migration |
||||
{ |
||||
/// <inheritdoc /> |
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<string>( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationReport", |
||||
type: "text", |
||||
nullable: false, |
||||
defaultValue: ""); |
||||
|
||||
migrationBuilder.AddColumn<string>( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationApplication", |
||||
type: "text", |
||||
nullable: false, |
||||
defaultValue: ""); |
||||
} |
||||
|
||||
/// <inheritdoc /> |
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationReport"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationApplication"); |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace Bit.PostgresMigrations.Migrations; |
||||
|
||||
/// <inheritdoc /> |
||||
public partial class _20250701_00_AlterOrganizationApplicationsql : Migration |
||||
{ |
||||
/// <inheritdoc /> |
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
|
||||
} |
||||
|
||||
/// <inheritdoc /> |
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
|
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace Bit.SqliteMigrations.Migrations; |
||||
|
||||
/// <inheritdoc /> |
||||
public partial class _20250626_00_AlterOrganizationReportsql : Migration |
||||
{ |
||||
/// <inheritdoc /> |
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<string>( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationReport", |
||||
type: "TEXT", |
||||
nullable: false, |
||||
defaultValue: ""); |
||||
|
||||
migrationBuilder.AddColumn<string>( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationApplication", |
||||
type: "TEXT", |
||||
nullable: false, |
||||
defaultValue: ""); |
||||
} |
||||
|
||||
/// <inheritdoc /> |
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationReport"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "ContentEncryptionKey", |
||||
table: "OrganizationApplication"); |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace Bit.SqliteMigrations.Migrations; |
||||
|
||||
/// <inheritdoc /> |
||||
public partial class _20250701_00_AlterOrganizationApplicationsql : Migration |
||||
{ |
||||
/// <inheritdoc /> |
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
|
||||
} |
||||
|
||||
/// <inheritdoc /> |
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
|
||||
} |
||||
} |
||||
Loading…
Reference in new issue