Skip to content

Instantly share code, notes, and snippets.

@SimonHaasnoot
Created April 3, 2018 10:06
Show Gist options
  • Save SimonHaasnoot/8fc7ee83c14690a9f10d99c889aa1210 to your computer and use it in GitHub Desktop.
Save SimonHaasnoot/8fc7ee83c14690a9f10d99c889aa1210 to your computer and use it in GitHub Desktop.
[ClaimType] nvarchar(max) NULL,
[ClaimValue] nvarchar(max) NULL,
[RoleId] nvarchar(450) NOT NULL,
CONSTRAINT [PK_AspNetRoleClaims] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AspNetRoleClaims_AspNetRoles_RoleId] FOREIGN KEY ([RoleId]) REFERENCES [AspNetRoles] ([Id]) ON DELETE CASCADE
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [event_locations] (
[EventId] int NOT NULL,
[LocationId] int NOT NULL,
CONSTRAINT [PK_event_locations] PRIMARY KEY ([EventId], [LocationId]),
CONSTRAINT [FK_event_locations_event_EventId] FOREIGN KEY ([EventId]) REFERENCES [event] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_event_locations_location_LocationId] FOREIGN KEY ([LocationId]) REFERENCES [location] ([Id]) ON DELETE CASCADE
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [AspNetUsers] (
[Id] nvarchar(450) NOT NULL,
[AccessFailedCount] int NOT NULL,
[ConcurrencyStamp] nvarchar(max) NULL,
[Email] nvarchar(256) NULL,
[EmailConfirmed] bit NOT NULL,
[LockoutEnabled] bit NOT NULL,
[LockoutEnd] datetimeoffset NULL,
[NormalizedEmail] nvarchar(256) NULL,
[NormalizedUserName] nvarchar(256) NULL,
[PasswordHash] nvarchar(max) NULL,
[PhoneNumber] nvarchar(max) NULL,
[PhoneNumberConfirmed] bit NOT NULL,
[SecurityStamp] nvarchar(max) NULL,
[TwoFactorEnabled] bit NOT NULL,
[UserID] int NOT NULL,
[UserName] nvarchar(256) NULL,
CONSTRAINT [PK_AspNetUsers] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AspNetUsers_people_UserID] FOREIGN KEY ([UserID]) REFERENCES [people] ([Id]) ON DELETE CASCADE
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [event_attendees] (
[EventId] int NOT NULL,
[PeopleId] int NOT NULL,
CONSTRAINT [PK_event_attendees] PRIMARY KEY ([EventId], [PeopleId]),
CONSTRAINT [FK_event_attendees_event_EventId] FOREIGN KEY ([EventId]) REFERENCES [event] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_event_attendees_people_PeopleId] FOREIGN KEY ([PeopleId]) REFERENCES [people] ([Id]) ON DELETE CASCADE
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [event_owners] (
[EventId] int NOT NULL,
[PeopleId] int NOT NULL,
CONSTRAINT [PK_event_owners] PRIMARY KEY ([EventId], [PeopleId]),
CONSTRAINT [FK_event_owners_event_EventId] FOREIGN KEY ([EventId]) REFERENCES [event] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_event_owners_people_PeopleId] FOREIGN KEY ([PeopleId]) REFERENCES [people] ([Id]) ON DELETE CASCADE
);
fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
Failed executing DbCommand (9ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [people_group] (
[GroupId] int NOT NULL,
[PeopleId] int NOT NULL,
CONSTRAINT [PK_people_group] PRIMARY KEY ([GroupId], [PeopleId]),
CONSTRAINT [FK_people_group_people_GroupId] FOREIGN KEY ([GroupId]) REFERENCES [people] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_people_group_people_PeopleId] FOREIGN KEY ([PeopleId]) REFERENCES [people] ([Id]) ON DELETE CASCADE
);
System.Data.SqlClient.SqlException (0x80131904): Introducing FOREIGN KEY constraint 'FK_people_group_people_PeopleId' on table 'people_group' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint or index. See previous errors.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite, String methodName)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
ClientConnectionId:3310d34c-3712-4363-8c94-970295680af3
Error Number:1785,State:0,Class:16
Failed executing DbCommand (9ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [people_group] (
[GroupId] int NOT NULL,
[PeopleId] int NOT NULL,
CONSTRAINT [PK_people_group] PRIMARY KEY ([GroupId], [PeopleId]),
CONSTRAINT [FK_people_group_people_GroupId] FOREIGN KEY ([GroupId]) REFERENCES [people] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_people_group_people_PeopleId] FOREIGN KEY ([PeopleId]) REFERENCES [people] ([Id]) ON DELETE CASCADE
);
System.Data.SqlClient.SqlException (0x80131904): Introducing FOREIGN KEY constraint 'FK_people_group_people_PeopleId' on table 'people_group' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint or index. See previous errors.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite, String methodName)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
ClientConnectionId:3310d34c-3712-4363-8c94-970295680af3
Error Number:1785,State:0,Class:16
Introducing FOREIGN KEY constraint 'FK_people_group_people_PeopleId' on table 'people_group' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint or index. See previous errors.
➜ backend git:(dev-simon) ✗
➜ backend git:(dev-simon) ✗ dotnet ef migrations add database_init_build23
BBBBBBBB EEEEEEEE UU UU NN NN IIII TTTTTTTT
BB BB EE UU UU NNN NN II TT
BB BB EE UU UU NNNN NN II TT
BBBBBBBB EEEEEE UU UU NN NN NN II TT
BB BB EE UU UU NN NNNN II TT
BB BB EE UU UU NN NNN II TT
BBBBBBBB EEEEEEEE UUUUUUU NN NN IIII TT
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using '/home/simon/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
Allowing CORS request for: http://*:80
Allowing CORS request for: http://*:5000
Allowing CORS request for: http://*:8080
Allowing CORS request for: http://*:8081
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 2.0.1-rtm-125 initialized 'ApplicationDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: None
Done. To undo this action, use 'ef migrations remove'
➜ backend git:(dev-simon) ✗ dotnet ef database update
BBBBBBBB EEEEEEEE UU UU NN NN IIII TTTTTTTT
BB BB EE UU UU NNN NN II TT
BB BB EE UU UU NNNN NN II TT
BBBBBBBB EEEEEE UU UU NN NN NN II TT
BB BB EE UU UU NN NNNN II TT
BB BB EE UU UU NN NNN II TT
BBBBBBBB EEEEEEEE UUUUUUU NN NN IIII TT
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using '/home/simon/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
Allowing CORS request for: http://*:80
Allowing CORS request for: http://*:5000
Allowing CORS request for: http://*:8080
Allowing CORS request for: http://*:8081
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 2.0.1-rtm-125 initialized 'ApplicationDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: None
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT OBJECT_ID(N'__EFMigrationsHistory');
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT OBJECT_ID(N'__EFMigrationsHistory');
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT [MigrationId], [ProductVersion]
FROM [__EFMigrationsHistory]
ORDER BY [MigrationId];
info: Microsoft.EntityFrameworkCore.Migrations[20402]
Applying migration '20180403094704_database_init_build'.
Applying migration '20180403094704_database_init_build'.
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [AspNetRoles] (
[Id] nvarchar(450) NOT NULL,
[ConcurrencyStamp] nvarchar(max) NULL,
[Name] nvarchar(256) NULL,
[NormalizedName] nvarchar(256) NULL,
CONSTRAINT [PK_AspNetRoles] PRIMARY KEY ([Id])
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [event] (
[Id] int NOT NULL IDENTITY,
[Description] nvarchar(max) NULL,
[End] datetime2 NOT NULL,
[Start] datetime2 NOT NULL,
[Title] nvarchar(max) NOT NULL,
CONSTRAINT [PK_event] PRIMARY KEY ([Id])
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [location] (
[Id] int NOT NULL IDENTITY,
[Description] nvarchar(max) NULL,
[Latitude] float NOT NULL,
[Longitude] float NOT NULL,
[Name] nvarchar(max) NOT NULL,
CONSTRAINT [PK_location] PRIMARY KEY ([Id])
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [people] (
[Name] nvarchar(max) NULL,
[Id] int NOT NULL IDENTITY,
[Discriminator] nvarchar(max) NOT NULL,
[Deleted] bit NULL,
[FirstName] nvarchar(max) NULL,
[Infix] nvarchar(max) NULL,
[LastName] nvarchar(max) NULL,
[Locale] nvarchar(max) NULL,
[Role] int NULL,
[Type] int NULL,
CONSTRAINT [PK_people] PRIMARY KEY ([Id])
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [AspNetRoleClaims] (
[Id] int NOT NULL IDENTITY,
[ClaimType] nvarchar(max) NULL,
[ClaimValue] nvarchar(max) NULL,
[RoleId] nvarchar(450) NOT NULL,
CONSTRAINT [PK_AspNetRoleClaims] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AspNetRoleClaims_AspNetRoles_RoleId] FOREIGN KEY ([RoleId]) REFERENCES [AspNetRoles] ([Id]) ON DELETE CASCADE
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [event_locations] (
[EventId] int NOT NULL,
[LocationId] int NOT NULL,
CONSTRAINT [PK_event_locations] PRIMARY KEY ([EventId], [LocationId]),
CONSTRAINT [FK_event_locations_event_EventId] FOREIGN KEY ([EventId]) REFERENCES [event] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_event_locations_location_LocationId] FOREIGN KEY ([LocationId]) REFERENCES [location] ([Id]) ON DELETE CASCADE
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [AspNetUsers] (
[Id] nvarchar(450) NOT NULL,
[AccessFailedCount] int NOT NULL,
[ConcurrencyStamp] nvarchar(max) NULL,
[Email] nvarchar(256) NULL,
[EmailConfirmed] bit NOT NULL,
[LockoutEnabled] bit NOT NULL,
[LockoutEnd] datetimeoffset NULL,
[NormalizedEmail] nvarchar(256) NULL,
[NormalizedUserName] nvarchar(256) NULL,
[PasswordHash] nvarchar(max) NULL,
[PhoneNumber] nvarchar(max) NULL,
[PhoneNumberConfirmed] bit NOT NULL,
[SecurityStamp] nvarchar(max) NULL,
[TwoFactorEnabled] bit NOT NULL,
[UserID] int NOT NULL,
[UserName] nvarchar(256) NULL,
CONSTRAINT [PK_AspNetUsers] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AspNetUsers_people_UserID] FOREIGN KEY ([UserID]) REFERENCES [people] ([Id]) ON DELETE CASCADE
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [event_attendees] (
[EventId] int NOT NULL,
[PeopleId] int NOT NULL,
CONSTRAINT [PK_event_attendees] PRIMARY KEY ([EventId], [PeopleId]),
CONSTRAINT [FK_event_attendees_event_EventId] FOREIGN KEY ([EventId]) REFERENCES [event] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_event_attendees_people_PeopleId] FOREIGN KEY ([PeopleId]) REFERENCES [people] ([Id]) ON DELETE CASCADE
);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [event_owners] (
[EventId] int NOT NULL,
[PeopleId] int NOT NULL,
CONSTRAINT [PK_event_owners] PRIMARY KEY ([EventId], [PeopleId]),
CONSTRAINT [FK_event_owners_event_EventId] FOREIGN KEY ([EventId]) REFERENCES [event] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_event_owners_people_PeopleId] FOREIGN KEY ([PeopleId]) REFERENCES [people] ([Id]) ON DELETE CASCADE
);
fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
Failed executing DbCommand (12ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [people_group] (
[GroupId] int NOT NULL,
[PeopleId] int NOT NULL,
CONSTRAINT [PK_people_group] PRIMARY KEY ([GroupId], [PeopleId]),
CONSTRAINT [FK_people_group_people_GroupId] FOREIGN KEY ([GroupId]) REFERENCES [people] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_people_group_people_PeopleId] FOREIGN KEY ([PeopleId]) REFERENCES [people] ([Id]) ON DELETE CASCADE
);
System.Data.SqlClient.SqlException (0x80131904): Introducing FOREIGN KEY constraint 'FK_people_group_people_PeopleId' on table 'people_group' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint or index. See previous errors.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite, String methodName)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
ClientConnectionId:cb058478-1d53-490c-9767-6c6c24f04cd6
Error Number:1785,State:0,Class:16
Failed executing DbCommand (12ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [people_group] (
[GroupId] int NOT NULL,
[PeopleId] int NOT NULL,
CONSTRAINT [PK_people_group] PRIMARY KEY ([GroupId], [PeopleId]),
CONSTRAINT [FK_people_group_people_GroupId] FOREIGN KEY ([GroupId]) REFERENCES [people] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_people_group_people_PeopleId] FOREIGN KEY ([PeopleId]) REFERENCES [people] ([Id]) ON DELETE CASCADE
);
System.Data.SqlClient.SqlException (0x80131904): Introducing FOREIGN KEY constraint 'FK_people_group_people_PeopleId' on table 'people_group' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint or index. See previous errors.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite, String methodName)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
ClientConnectionId:cb058478-1d53-490c-9767-6c6c24f04cd6
Error Number:1785,State:0,Class:16
Introducing FOREIGN KEY constraint 'FK_people_group_people_PeopleId' on table 'people_group' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint or index. See previous errors.
➜ backend git:(dev-simon) ✗
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment