Base solution for your next web application

Activities of "[email protected]"

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.

Question

Does the ASP.Net Zero supports PostgreSQL database? I am trying to run the migration against the database and in between its throwing an exception Unhandled MigrationOperation AlterTableOperation in NpgsqlMigrationSqlGenerator

I have added the Npgsql.EntityFramework for migration.

Showing 11 to 13 of 13 entries