codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.3k stars 1.89k forks source link

Some migrations not running #2139

Closed MGatner closed 5 years ago

MGatner commented 5 years ago

I reran all migrations after today's refactor and ended up with 10 entries instead of the 14 I had previously. I can't dig right now but I thought I'd share the results in case they are helpful:

mysql> select * from dev_migrations;
+----------------+---------------------------+---------+-------------------+------------+
| version        | name                      | group   | namespace         | time       |
+----------------+---------------------------+---------+-------------------+------------+
| 20190319121802 | create_table_visits       | default | Tatter\Visits     | 1555960196 |
| 20190407221924 | create_table_settings     | default | Tatter\Settings   | 1555960196 |
| 20190326110032 | create_table_permits      | default | Tatter\Permits    | 1555960196 |
| 20190404090152 | create_table_audits       | default | Tatter\Audits     | 1555960196 |
| 20171120223112 | create_auth_tables        | default | Myth\Auth         | 1555960787 |
| 20190425103343 | create_table_tasks        | default | Tatter\Workflows  | 1557768464 |
| 20190425103401 | create_table_workflows    | default | Tatter\Workflows  | 1557768464 |
| 20190425103427 | create_table_jobs         | default | Tatter\Workflows  | 1557768464 |
| 20190425103555 | create_table_stages       | default | Tatter\Workflows  | 1557773099 |
| 20190620100802 | create_table_themes       | default | Tatter\Themes     | 1561042871 |
| 20190327133719 | create_table_careers      | default | App               | 1564101328 |
| 20190724212056 | create_table_files        | default | Tatter\Files      | 1564110660 |
| 20190801215042 | create_table_exports      | default | Tatter\Exports    | 1564772600 |
| 20190808191740 | create_table_thumbnailers | default | Tatter\Thumbnails | 1565316598 |
+----------------+---------------------------+---------+-------------------+------------+
14 rows in set (0.00 sec)

... and after the refactor:

mysql> select * from dev_migrations;
+----+----------------+-----------------------------------------------------------------------+---------+-----------+------------+-------+
| id | version        | class                                                                 | group   | namespace | time       | batch |
+----+----------------+-----------------------------------------------------------------------+---------+-----------+------------+-------+
|  1 | 20190327133719 | App\Database\Migrations\Migration_create_table_careers                | default | DeepCopy  | 1565663921 |     1 |
|  2 | 20171120223112 | Myth\Auth\Database\Migrations\Migration_create_auth_tables            | default | DeepCopy  | 1565663921 |     1 |
|  3 | 20190404090152 | Tatter\Audits\Database\Migrations\Migration_create_table_audits       | default | DeepCopy  | 1565663921 |     1 |
|  4 | 20190326110032 | Tatter\Permits\Database\Migrations\Migration_create_table_permits     | default | DeepCopy  | 1565663921 |     1 |
|  5 | 20190407221924 | Tatter\Settings\Database\Migrations\Migration_create_table_settings   | default | DeepCopy  | 1565663921 |     1 |
|  6 | 20190319121802 | Tatter\Visits\Database\Migrations\Migration_create_table_visits       | default | DeepCopy  | 1565663921 |     1 |
|  7 | 20190425103343 | Tatter\Workflows\Database\Migrations\Migration_create_table_tasks     | default | DeepCopy  | 1565663921 |     1 |
|  8 | 20190425103401 | Tatter\Workflows\Database\Migrations\Migration_create_table_workflows | default | DeepCopy  | 1565663921 |     1 |
|  9 | 20190425103427 | Tatter\Workflows\Database\Migrations\Migration_create_table_jobs      | default | DeepCopy  | 1565663921 |     1 |
| 10 | 20190425103555 | Tatter\Workflows\Database\Migrations\Migration_create_table_stages    | default | DeepCopy  | 1565663921 |     1 |
+----+----------------+-----------------------------------------------------------------------+---------+-----------+------------+-------+
10 rows in set (0.00 sec)
MGatner commented 5 years ago

And the output from spark migrate:status:

./spark migrate:status

CodeIgniter CLI Tool - Version 4.0.0-beta.4 - Server-Time: 2019-08-12 22:51:34pm

App
  Filename                Migrated On: 
  create_table_careers    ---
Myth\Auth
  Filename              Migrated On: 
  create_auth_tables    ---
Tatter\Addins
No migrations were found.
Tatter\Alerts
No migrations were found.
Tatter\Assets
No migrations were found.
Tatter\Audits
  Filename               Migrated On: 
  create_table_audits    ---
Tatter\Exports
  Filename                Migrated On: 
  create_table_exports    ---
Tatter\Files
  Filename              Migrated On: 
  create_table_files    ---
Tatter\Handlers
No migrations were found.
Tatter\Permits
  Filename                Migrated On: 
  create_table_permits    ---
Tatter\Reports
No migrations were found.
Tatter\Settings
  Filename                 Migrated On: 
  create_table_settings    ---
Tatter\Themes
  Filename               Migrated On: 
  create_table_themes    ---
Tatter\Thumbnails
  Filename                   Migrated On: 
  create_table_thumbnails    ---
Tatter\Visits
  Filename               Migrated On: 
  create_table_visits    ---
Tatter\Workflows
  Filename                  Migrated On: 
  create_table_tasks        ---
  create_table_workflows    ---
  create_table_jobs         ---
  create_table_stages       ---
MGatner commented 5 years ago

Resolved by https://github.com/codeigniter4/CodeIgniter4/pull/2137