Questions tagged as 'migrations'

0
answers

Is there any way to run a seed only once? [closed]

I use the CakePhp 3 framework, I was researching on migrations and seeds and did some testing, the migrations they run only once per sphinx log table, however if I seed it and call it xSeed, and run this seed on the command line, then create a y...
asked by 02.03.2018 / 02:20
0
answers

Migration with custom fields in Laravel

I'm not sure what to do, Is there a way to create fields in my Model and when running the Migration framework automatically create these fields in my Up method? In the documentation and tutorials that I see, it is always necessary to change...
asked by 19.01.2018 / 14:06
2
answers

Project Laravel works in mysql but the error in the migration when using postgres

I have a project that I started in mysql, I created some migration and I put relationships inside them, whenever I needed to make changes, delete the database and run the migrate again, with mysql always worked. I need to change the database f...
asked by 17.11.2017 / 20:37
1
answer

Laravel 5.4 Migrations? [duplicate]

I am learning Laravel 5.4 , when I create a related table one to one is not creating the foreign key, but creates the tables normally. My Migrations: <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Sc...
asked by 23.08.2017 / 20:54
0
answers

Error generating migration after changing a relationship

I'm having an error changing a many to many relationship in the entity framework I had 3 classes: Policy 1-n Normative Policy n-1 Normative I did not want to map this auxiliary table in the hand, so I deleted the class PoliticalNor...
asked by 29.08.2017 / 14:37
0
answers

Migration with multiple banks in Laravel

I'm trying to create a migration that has a foreign key referencing the id of a table from another database, both MySQL. Follow the code: //config/database.php 'mysql' => [ 'driver' => 'mysql', 'host' => env...
asked by 21.06.2017 / 13:26
0
answers

Python with django is giving problem when migrating a template

   C: \ Program Files Python \ mysite> python manage.py makemigrations polls   Traceback (most recent call last):     File "manage.py", line 22, in       execute_from_command_line (sys.argv)     File "C: \ Python27 \ lib \ site-packages \ django...
asked by 07.05.2017 / 21:06
1
answer

Code First Migration Relationship and Insert?

I'm using UserManager to manage users, I'm using migration and I'm having relationship problem. It turns out that I have the Cliente entity: public class Cliente : IdentityUser { [NotMapped] public string Senha...
asked by 27.01.2017 / 11:53
0
answers

Execute a migration by passing parameters in Laravel 5

I am creating a robust application where I will define which commands will be executed within a database according to the subdomain (which is also the name of the client database). How can I pass this parameter to a Laravel migration? I'm lookin...
asked by 28.11.2016 / 17:59
0
answers

Error in Enable-Migrations in EF5 with MySql

I have a problem in my project, when trying to enable Migrations in the project it generates an exception as below: > System.IO.FileLoadException: Could not load file or assembly 'MySql.Data.Entity.EF5, Version=6.9.8.0, Culture=neutral, Pub...
asked by 27.04.2016 / 20:55