Skip to content

Commit

Permalink
Update TOML + Final Mig Script
Browse files Browse the repository at this point in the history
  • Loading branch information
WIN2016\redgate committed Mar 6, 2024
1 parent a22beaa commit 00420bf
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 8 deletions.
2 changes: 1 addition & 1 deletion flyway.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "FlywayTrialProject"
databaseType = "SqlServer"

[environments.development]
url = "jdbc:sqlserver://localhost;databaseName=WidgetDev_Bhaskae;encrypt=true;integratedSecurity=true;trustServerCertificate=true"
url = "jdbc:sqlserver://localhost;databaseName=WidgetDev;encrypt=true;integratedSecurity=true;trustServerCertificate=true"
displayName = "Development database"

[environments.shadow]
Expand Down
35 changes: 35 additions & 0 deletions migrations/U013_20240306105659__UNDO-redgate.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
PRINT N'Dropping [dbo].[OctoAddress]'
GO
DROP TABLE [dbo].[OctoAddress]
GO
PRINT N'Altering [dbo].[Widgets]'
GO
ALTER TABLE [dbo].[Widgets] DROP
COLUMN [RedgateID]
GO
PRINT N'Refreshing [dbo].[CurrentPrices]'
GO
EXEC sp_refreshview N'[dbo].[CurrentPrices]'
GO
PRINT N'Creating [dbo].[HuxTest]'
GO
CREATE TABLE [dbo].[HuxTest]
(
[Hux] [nchar] (10) NULL,
[Test] [nchar] (10) NULL
)
GO
PRINT N'Creating [dbo].[Socials]'
GO
CREATE TABLE [dbo].[Socials]
(
[Twitter] [nchar] (10) NULL,
[Handle] [nchar] (10) NULL,
[Age] [nchar] (10) NULL
)
GO

32 changes: 32 additions & 0 deletions migrations/V013_20240306105659__redgate.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
PRINT N'Dropping [dbo].[Socials]'
GO
DROP TABLE [dbo].[Socials]
GO
PRINT N'Dropping [dbo].[HuxTest]'
GO
DROP TABLE [dbo].[HuxTest]
GO
PRINT N'Altering [dbo].[Widgets]'
GO
ALTER TABLE [dbo].[Widgets] ADD
[RedgateID] [nchar] (10) NULL
GO
PRINT N'Refreshing [dbo].[CurrentPrices]'
GO
EXEC sp_refreshview N'[dbo].[CurrentPrices]'
GO
PRINT N'Creating [dbo].[OctoAddress]'
GO
CREATE TABLE [dbo].[OctoAddress]
(
[FirstName] [nchar] (10) NULL,
[LastName] [nchar] (10) NULL,
[OctopusID] [nchar] (10) NULL,
[OctopusAccount] [nchar] (10) NULL
)
GO

6 changes: 0 additions & 6 deletions schema-model/Tables/dbo.HuxTest.sql

This file was deleted.

8 changes: 8 additions & 0 deletions schema-model/Tables/dbo.OctoAddress.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE [dbo].[OctoAddress]
(
[FirstName] [nchar] (10) NULL,
[LastName] [nchar] (10) NULL,
[OctopusID] [nchar] (10) NULL,
[OctopusAccount] [nchar] (10) NULL
)
GO
3 changes: 2 additions & 1 deletion schema-model/Tables/dbo.Widgets.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ CREATE TABLE [dbo].[Widgets]
(
[RecordID] [int] NOT NULL IDENTITY(1, 1),
[Description] [varchar] (50) NULL,
[Twitter] [varchar] (50) NULL
[Twitter] [varchar] (50) NULL,
[RedgateID] [nchar] (10) NULL
)
GO
ALTER TABLE [dbo].[Widgets] ADD CONSTRAINT [PK_Widgets] PRIMARY KEY NONCLUSTERED ([RecordID])
Expand Down

0 comments on commit 00420bf

Please sign in to comment.