Answer the question
In order to leave comments, you need to log in
Why does the php artisan migrate command remove all tables from the database and not create new ones?
Started watching Laravel.
Installation on WSL Debian - Linux DESKTOP-SFQJT9I 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 GNU/Linux
PHP 7.3.19-1~deb10u1 (cli) (built: 5 Jul 2020 06:46:45) ( NTS )
npm 6.14.10
node v12.20.1
Laravel Framework 8.25.0
php artisan serve - Starting
In env, register connection with PostgreSQL 10.
Add Jetstream at https://jetstream.laravel.com/2. x/installation.html (inertia)
And at the end php artisan migrate doesn't work.
Test:
1. php artisan migrate:status
Migration table not found. - Correctly. Bases are empty.
2. php artisan migrate:install
Migration table created successfully.
Nice to see "created successfully". But there is only one table "migrations" in the database.
3. php artisan migrate:status
+------+-------------------------------------------------- ----------------------
| ran? | Migration
+------+----------------------------------------- ----------------
| No | 2014_10_12_000000_create_users_table
| No | 2014_10_12_100000_create_password_resets_table
| No | 2014_10_12_200000_add_two_factor_columns_to_users_table
| No | 2019_08_19_000000_create_failed_jobs_table
| No | 2019_12_14_000001_create_personal_access_tokens_table
| No | 2020_05_21_100000_create_teams_table
| No | 2020_05_21_200000_create_team_user_table
| No | 2020_05_21_300000_create_team_invitations_table
| No | 2021_01_29_152547_create_sessions_table I
didn't touch anything in the files.
4. php artisan migrate
Loading stored database schema: /mnt/.../database/schema/pgsql-schema.dump
Loaded stored database schema. (148.06ms)
...
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "migrations" does not exist
Check - Database is empty. There is no migrations table.
Why and why is migrations removed?
Tell me where I made a stupid mistake?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question