Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MigrationBuilder.CreateSchema(string name) + SQL Server is missing batch sepator #2112

Closed
ChristianHenrikReich opened this issue May 2, 2015 · 0 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@ChristianHenrikReich
Copy link

Having

public override void Up(MigrationBuilder migration)
{
    migration.CreateSchema("Test");
    migration.CreateTable(
        name: "AspNetRoles",
        // ... Lines omitted for readablity
}

Produces this invalid SQL Server SQL

CREATE SCHEMA [Account];
CREATE TABLE [AspNetRoles] (
    [ConcurrencyStamp] nvarchar(max),
    [Id] nvarchar(450),
    [Name] nvarchar(max),
    [NormalizedName] nvarchar(max),
    CONSTRAINT [PK_AspNetRoles] PRIMARY KEY ([Id])
);

A batch separator is missing,it should be like

CREATE SCHEMA [Account];
GO 
CREATE TABLE [AspNetRoles] (
    [ConcurrencyStamp] nvarchar(max),
    [Id] nvarchar(450),
    [Name] nvarchar(max),
    [NormalizedName] nvarchar(max),
    CONSTRAINT [PK_AspNetRoles] PRIMARY KEY ([Id])
);
@rowanmiller rowanmiller added this to the 7.0.0 milestone May 13, 2015
@bricelam bricelam modified the milestones: 7.0.0-beta6, 7.0.0 Jul 1, 2015
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 15, 2022
@ajcvickers ajcvickers modified the milestones: 1.0.0-beta6, 1.0.0 Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

4 participants