Questions tagged [artisan-migrate]

192 questions
0
votes
1 answer

Exception on php artisan migrate Illuminate\Database\QueryException SQLSTATE[HY000] [2054]

I created a database on the terminal and mysql version is 8.0.21 Homebrew. I access the database using TablePlus. However when I tried to migrate the database after creating the database it gave me the following error. My php version is 7.3.11. Any…
Mishal
  • 450
  • 9
  • 27
0
votes
1 answer

laravel migrate revert when stuck half-way

I ran laravel migration for given path dir only in new database. Only migrations file from database/dmf_migrations directory is run. And then half-way I get this Base table already exists error. Here's the last migration run with batch no. 127: I…
Azima
  • 3,835
  • 15
  • 49
  • 95
0
votes
1 answer

Laravel 7 : Making foreign key from non primary key

I have the following relationship diagram erd green highlighted text represent primary key and yellow highlighted text represent foreign key,as you can see the foreign key are non primary key I have created this three table but getting this error…
mirsahib
  • 375
  • 1
  • 4
  • 12
0
votes
1 answer

foreign key not migrate. I have some problems with migrations. I already well migrate company table

This my code Schema::create('employees', function (Blueprint $table) { $table->id(); $table->string('first_name'); $table->text('second_name'); $table->string('emp_company')->unsigned(); …
0
votes
0 answers

Can't run laravel artisan command in the unit test

I have Laravel framework v5.8.29. And I can't run artisan command in a unit test either using $this->artisan() nor Artisan::call(). migrate command prints absolutely nothing. It seems like the command just even was not called! But it works pretty…
James Bond
  • 2,229
  • 1
  • 15
  • 26
0
votes
1 answer

Laravel - unable to run migrations on google cloud

I was able to run migrations on my local mysql. But I was not able to do it on the google cloud SQL instance. What am I missing here? I've tried to add all relevant information here. But please let me know if you need more details. I wrote a route…
bezz
  • 83
  • 1
  • 12
0
votes
4 answers

Git Cloned Laravel Project failing at php artisan migrate and php artisan db:seed

I git cloned a repository for a project written in Laravel/PHP. I was able to get most things running locally and I was able to create the initial migrations folder but I'm stuck at the seeding and table creation point (?). I keep get the following…
0
votes
0 answers

php artisan migrate command error, could not find driver

I'm trying to connect my laravel app to my MySql database but i get this error, I' using wamp server on windows, i've tried pretty much everything i can find on the internet but to no avail, I should mention that few days before i started this…
Zak
  • 1
  • 2
0
votes
2 answers

getting following error " 150 "Foreign key constraint is incorrectly formed"" on the console

I've checked several times against other projects and I just cannot see what's wrong. I attach my code: Schema::table('datos', function (Blueprint $table) { $table->bigInteger('sensor_id')->change(); …
Esteban
  • 3
  • 2
0
votes
0 answers

create migration and model together but add prefix to the migration name

I want to create model and migration together like: php artisan make:model Models/Program -m However, I want to name migration as pas_programs and not programs Is there any way?
0
votes
1 answer

php artisan migrate doesn't work with XAMP in Laravel5.4

I'm using command "php artisan migrate" but it shows error as Access denied for user, My all migrations have been created successfully but they are unable to migrate in localhost phpmyadmin? In comand promt I successfully created migrations but…
Khadija Saeed
  • 27
  • 1
  • 3
  • 10
0
votes
3 answers

php artisan migrate - tables not created in phpMyAdmin

I am following this tutorial here https://www.youtube.com/watch?v=Jbt5bEgv_QM and got stuck in the php artisan migrate part because of this issue. I'm not sure if it's compatibility issue or something. I am fairly new to laravel. Here's the…
Falady
  • 124
  • 1
  • 15
0
votes
5 answers

Laravel Migration: Base table or view already exists

Background We're using Laravel (5.8) migration for one of our projects from the very beginning. During development we made some migrations. After some time, we found that, some of the migrations are related to setup/configuration. So we moved them…
Mayeenul Islam
  • 4,532
  • 5
  • 49
  • 102
0
votes
1 answer

Created a fresh database, now running any artisan command throws an error about a missing table

I wanted a fresh development database so I could seed with new data, so I manually dropped and recreated my development database and now running any artisan commands throws an error. I continuously get an error saying that I'm missing a table. In…
0
votes
1 answer

Laravel - How do I migrate data into a live database using artisan migration?

I have successfully created a database 'translations' table using artisan migration. When this database is released into a production environment, I will start getting translation text files for new translation content. They are formatted as SQL…
Chris
  • 33
  • 4