Questions tagged as 'migrations'

1
answer

Code First Migrations MySQL - Specify the '-Verbose' flag to view the SQL statements being applied to the target database

I'm creating a Web application in C # and for the sake of the hosting server, the database is in MySql. So I installed MySql.Data.Entity, EF6, I activated Migrations, added the class Migrations, but at the time of giving Update-database -Verb...
asked by 03.07.2015 / 07:42
1
answer

How to simplify the type declaration with Entity Frameowrk?

I have some tables with several fields of type datetime, and for all of them I need to create a validation in OnModelCreating () for this type, that is, I need to set .HasColumnType("datetime"); , my doubts are; Is there a more practical...
asked by 24.11.2016 / 13:59
1
answer

Entity Framework Migration - Indicate migrations as performed

I'm working on an ASP.NET MVC system with Entity Framework, which uses Migrations. It has the following initializer: public void InitializeDatabase(Contexto context) { if (!context.Database.Exists()) { context.Database.Cre...
asked by 14.12.2015 / 20:00
1
answer

Entity Framework Core 2.0 - Add-Migration does not work

I'm creating a new code-first project. When trying to create the migration, using the [Add-Migration Initial -Context LogAuditoriaContext] command it simply does nothing, does not create, does not give error, does not report anything: I have...
asked by 27.12.2017 / 14:43
1
answer

Migration Conventions

I have an MVC application in DDD that uses SQLServer. I'm looking to take the database to PostGresSQL, but an FK duplicity error occurs. For example, in the SqlServer pattern would be generated: FK_dbo.Adicao_dbo.OrgaoEmissorAtoLegal_ExT...
asked by 05.10.2018 / 21:19
2
answers

EntityFramework AspNet Core migrations

Good evening, I came across a problem updating the DB of an AspNet Core application. I had created the database, but I ended up deleting it now when trying to create it again using the following commands: dotnet ef migrations Initial dotnet e...
asked by 17.02.2017 / 02:00
1
answer

Migrating Microsoft SQL to Postgres

I need to migrate my SQL database to Postgre-SQL, but I do not have much intimacy with the database itself. Is there any tool that can help with migration? I have backup of generated MS SQL .bak is it possible to convert it? Thankful!     
asked by 07.10.2015 / 20:43
1
answer

Error Entity Framework Core

I have an error with Entity Framework core when I add Migration, the following error appears to me: System.InvalidOperationException: Cannot use table 'Atleta' for entity type 'Pessoa' since it is being used for entity type 'Atleta' and th...
asked by 08.03.2018 / 17:16
1
answer

MYSQL to POSTGRESQL via SED

I'm looking for a way to migrate my backup from a MySQL database to Postgresql. The simplest way I found was by using sed on top of the backup, but it did not work. It was as follows: 1 - Performing a backup 2 - Running the command s...
asked by 13.10.2016 / 18:39
1
answer

Remove creation of serial column EntityFramework + Npgsql

Hello, I'm creating an application using Fluent API + Entityframework. However in my domain classes when determining that a property is PK it automatically defines it as serial, I would not like to get this behavior because it will automatically...
asked by 25.10.2016 / 03:30