Skip to content

Commit

Permalink
Create Schema Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Jun 23, 2022
1 parent 0d39212 commit d67627f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions NeuroSpeech.Eternity.SqlStorage/ModelGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ internal static async Task CreateAsync(SqlConnection conn,
{
// create workflows table..
var createScript = TemplateQuery.New(@$"
IF object_id('[{schemaName}]') is null
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = '{schemaName}')
BEGIN
EXEC ('CREATE SCHEMA {schemaName};')
END;
EXEC('CREATE SCHEMA [{schemaName}]')
END
IF object_id('[{schemaName}].[{tableName}]') is null
BEGIN
CREATE TABLE [{schemaName}].[{tableName}] (
Expand Down

0 comments on commit d67627f

Please sign in to comment.