using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations.Operations;
using Microsoft.EntityFrameworkCore.Update;

namespace IRaCIS.Core.Test
{
    public class NoForeignKeyMigrationsSqlGenerator : SqlServerMigrationsSqlGenerator
    {


        public NoForeignKeyMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies dependencies, ICommandBatchPreparer commandBatchPreparer)
      : base(dependencies, commandBatchPreparer)
        {
        }

        protected override void Generate(Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true)
        {
            operation.ForeignKeys.Clear();
            base.Generate(operation, model, builder, terminate);
        }
        protected override void Generate(AddForeignKeyOperation operation, IModel? model, MigrationCommandListBuilder builder, bool terminate = true)
        {

        }

    }
}
