Questions tagged as 'migrations'

4
answers

Multiple contexts Migrations Entity Framework

I have several projects and each project has a context. I would like to know how to use Migrations to update and generate only one database of these various contexts?     
asked by 26.02.2015 / 06:40
1
answer

Help with configuring DbContext with EntityFramework using good practices

I have my application layered with Class Library and my layer with Entity Framework , where I set DbContext , it's Repository . My class inherited from DbContext: public class Context : DbContext { private stati...
asked by 18.03.2014 / 01:36
3
answers

Laravel: Migrations

I have a question about Laravel's Migrations and I believe they can help me. 1 - I created a model with migration by php artisan make:model Evento -m; 2 - In addition to increments and timestamps I added one more field to the migrat...
asked by 12.09.2015 / 23:43
2
answers

What is and what is a Seeder for?

I saw in% w_of% that there is a folder named Laravel . In it we have migrations and seeds. I understand that migrations are migrations, they are codes that provide specifications for creating the tables in the database, without the need...
asked by 04.05.2016 / 17:01
1
answer

Create View in MySQL through Laravel

How can I create a view in the MySQL database through migrations of Laravel? I did not find anything in the documentation.     
asked by 26.09.2016 / 19:35
1
answer

Error saving field of type DateTime

I am setting up an example of Code First, but at the time of saving a field of type DateTime in the database I get the following error    Converting a datetime2 data type to a datetime data type   resulted in a value out of range. \ r \ nThe...
asked by 23.11.2016 / 19:58
2
answers

EntityFramework, Migrations and MySql. Schema name being misinterpreted. How to solve?

I'm having a problem using migrations with MySql . When I try to create the first version with Migrations it is making the schema / bank name part of the table name: public partial class Initial : DbMigration { public override...
asked by 03.07.2015 / 00:38
1
answer

Entity Framework with Oracle

I'm trying to use EF, using Code Frist, along with an Oracle database, so I'm using the Nuget package Oracle.ManagedDataAccess.EntityFramework , however whenever I try to run Update-Database it gives the following error message:    Sy...
asked by 14.07.2017 / 04:54
1
answer

MIgrations, Updating a null field to not null

I'm updating the phone and CPF field of my User entity that was allowing nulls to non-null. follow the migration file public partial class Required_fild_users_cpf_phone : DbMigration { public override void Up() { AlterColumn("d...
asked by 01.12.2017 / 14:38
1
answer

How to control migrations two different contexts?

I have two contexts and would like to know how to activate each of them. For example Add-Migration Contexto 1, Add-Migration 2 How can I add new migrations for each context?     
asked by 10.01.2018 / 09:55