Questions tagged as 'migrations'

1
answer

How to publish .mdf database in Azure SQL Dabases?

I have solution with a Asp.Net MVC 5 project and I'm using Code First and Migrations to update the .mdf database automatically generated in the App_Data folder. How do I put this .mdf in Azure and can u...
asked by 15.09.2014 / 20:56
1
answer

How can I change the attribute of a column with Laravel Migrations

In my database I created using laravel migrations I have a column called celphone that unfortunately I did not add the ->nullable() attribute when I created it, now that the base is already in production I want to version this c...
asked by 14.07.2018 / 02:04
1
answer

DDD + Entityframework + Migrations + SQL Server

Hello, I have a Solution that I am implementing the DDD architecture with Entityframework, migrations and SQL Server! However, I am not able to connect to my local database when performing the migrations command: 'Updata-database'! I believe tha...
asked by 09.05.2018 / 23:51
2
answers

When placing a class in DbSet using Migrations

I have the following classes: public DbSet<Request> Requests { get; set; } public DbSet<Answer> Answers { get; set; } being that they have a one-to-many relationship. When I want a class to be added to my EntityFramework migra...
asked by 08.06.2018 / 13:55
1
answer

Migration with possible data loss

When generating an update of db that results in possible loss of data efcore shows alert:    An operation was scaffolded that may result in the loss of data.   Please review the migration for accuracy. (In this specific cas...
asked by 11.01.2017 / 02:43
1
answer

How to use artisan make: migration in a subdirectory with Laravel 5

I'm starting to build an extremely robust application using laravel 5 and I need to organize all my tables migration codes. My solution was to structure subfolders to make it easier to understand and modularize this application. The problem is t...
asked by 28.11.2016 / 17:13
1
answer

Problem with referential integrity in migrations (Laravel 5)

I have a problem using onDelete('set null') in a foreign key. You are returning the error:    [Illuminate \ Database \ QueryException]   SQLSTATE [HY000]: General error: 1215 Can not add foreign key constraint   (SQL: alter table u...
asked by 30.11.2016 / 16:59
1
answer

Argument data type xml is invalid for argument 1 of len function

I'm mapping a property to the xml-type database using Migrations . public string Xml { get; set; } this.Property(t => t.Xml).HasColumnName("Xml").HasColumnType("xml"); However, querying the class using Linq returns the error. _...
asked by 23.02.2016 / 14:59
1
answer

How to do migrations and versioning with firebird database?

I recently found this site Flyway DB where, as far as I understand, it is possible to create migrations and control the version of the database. But I do not think it supports Firebird. Is there any similar tool with firebird support? Or is it...
asked by 12.08.2015 / 22:24
1
answer

Error using the add-migration command. Using json as configuration file

Good morning! When I run the add-migration command, to do the migrations, I'm getting the following error: Add-Migration : Exception calling "AddFromFile" with "1" argument(s) : "'basePath' não pode ser uma cadeia de caracteres vaz...
asked by 25.07.2018 / 16:24