Questions tagged as 'migrations'

2
answers

Deleted Files Django Migrations

I'm having a constant problem. As I'm working with several branches in a project, sometimes I go back in an old branch, I bring branch updated to old so I do not have to be creating old bank migration. So every time of the problem with migration...
asked by 29.06.2017 / 23:22
1
answer

Migrations HasMaxLength x HasColumnType

I'm creating a simple test table with EF Core e SQlite The first test in which modelbuilder creates a migration (shown just below) protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.En...
asked by 17.09.2016 / 04:52
1
answer

Migration generated empty after Scaffolding

I'm studying ASP.NET MVC5, so I created a model called RelatorioTagModels : public class RelatorioTagModels { [Key] public int TagID { get; set; } [Required] public decimal Tag { get; set; } [Required] public de...
asked by 16.02.2017 / 15:53
1
answer

How to add a foreign key with Migration?

I'm now learning to use Migration of Laravel . I was able to understand the understanding well, but I still do not know how to add a foreign_key I have the following Migration: Schema::create('usuarios', function (Blue...
asked by 29.04.2016 / 14:29
1
answer

(LocalDB) Update-Database Post-Error Error - "Can not attach the file ..."

I'm trying to use Sql Serves LocalDB in an application with the Entity Framework and Migrations, but when I give the Update-Database command, the following error occurs:    Can not attach the file   'C: \ Directories \ 9-ProjectsMVS \ DB Test...
asked by 06.08.2018 / 19:08
1
answer

Migrate: Is it possible to change a table to add a column and already pass some value to it (excluding the nullable () option)?

for example I have the student table (name, age); Then I create a migration to add the genre (M / F) Schema::table('estudantes', function (Blueprint $table) { $table->string('genero')->nullable(); }); But instead of us...
asked by 11.01.2018 / 19:27
1
answer

Creating Migration Error

I am creating a user registry in C #, but when I include the domain layer and I am going to create the migration, the error below is happening. I could not identify what is happening. "No suitable builder found for entity type 'User'. The fol...
asked by 06.07.2018 / 03:18
1
answer

Questions about relationships in Rails "field must exists"

Good morning, I started to study rails recently and whenever I define the relationships between the entities in my database, some doubts arise. The first time, I created and defined relationships in migrations. I did this: class CreatePr...
asked by 27.07.2017 / 15:42
1
answer

EF 6 - Migrations does not reflect changes in entities

I changed my entities and circled the command Update-Database -Verbose -Script only to see in% with_% what changes would be made. Generated legal script with all changes. I closed the script window and circled the SQL , which did...
asked by 30.06.2017 / 22:58
1
answer

Sequelize Migrate - Error: TypeError: defineCall is not a function

Hi, I'm doing a simple championship API, I used Sequelize as ORM for my database. I created the Arbitrator table that had only the NAME field and did not have the CPF field in the table. I had to include the CPF field in the Arbitra...
asked by 20.05.2017 / 18:24