Base solution for your next web application

Activities of "[email protected]"

Thanks for the help we have did that and it was working just wanted to know if that is the approach or not since the documentation did not mention that

Thanks for the input.

I am able to log all the DML statements but not the DDL statements.

Thanks for the reply i need to log all the SQL statments into a log when the Migrator exe is run on production environment so as to check if what all things got fired and to cross check also if everything went well.

Hi,

My user is abhishekbdutta

the link is not working

Answer

Hi Guys,

Thanks for all the reply.

I am now able to run the migration on the PostgreSQL.

There are some changes required and some things which as of now i have commented.

Following is the list Code changes done

  1.    TCDbConfiguration:  
         SetProviderServices("Npgsql", Npgsql.NpgsqlServices.Instance);
         SetProviderFactory("Npgsql", Npgsql.NpgsqlFactory.Instance);
         SetDefaultConnectionFactory(new Npgsql.NpgsqlConnectionFactory());
         SetMigrationSqlGenerator("Npgsql", MyNPGSqlGenerator.Instance);
    
  2. Added the class public class MyNPGSqlGenerator : NpgsqlMigrationSqlGenerator { public override IEnumerable<MigrationStatement> Generate(IEnumerable<System.Data.Entity.Migrations.Model.MigrationOperation> operations, string providerManifestToken) { var statments = new List<MigrationOperation>(); foreach (var item in operations) { var migration = item as AlterTableOperation; if (migration == null) { statments.Add(item); } } return base.Generate(statments, providerManifestToken); }

     public static MyNPGSqlGenerator Instance()
     {
         return new MyNPGSqlGenerator();
     }
    

    }

  3. changed all the migration code to have dbo.Tablename ex: CreateTable( "dbo.AbpPermissions"

  4. Currently commented the Sql functionality in the migration.

Showing 1 to 6 of 6 entries