robinNcode / db_craft

DB Craft - CodeIgniter 4 Seeder, Migration Generator
15 stars 3 forks source link

Add constant for migration table and optimize foreign key generation logic #4

Closed clsmedia closed 5 months ago

clsmedia commented 5 months ago

In this commit, several improvements were made to the MigrationGenerator.php file. Firstly, changes in generateAllMigration() prevent migration of 'migrations' table as its created automatically during migration process.

Additionally, the logic for generating foreign keys was fixed as the column_name and foreign_column_name are returned as arrays so we should get the first element from that array.

clsmedia commented 5 months ago

btw. thank you for this package!

robinNcode commented 5 months ago

Thank you, @clsmedia for your contribution. Recently I was busy with my office work and could not monitor this issue. If you have any further issues let me know.