This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi, Is there a quick way/command to create migration files for existing tables?
I'm working on a project where I had to migrate an old site, with lots on data and tables. In many cases I copied tables or views from the old database to the new one so now I have 8 plugins and lots of tables without migration files.
Is there a way to create them automatically?
Last updated
mjauvin said:
Maybe try this?
This is looks promising thank you.
I was about to try to extend/modify the builder plugin. I figured out that if I send null value to createOrUpdateTable($newSchema, $existingSchema, $newTableName);
for existingSchema
parameter, from generateCreateOrUpdateMigration()
I'm almost there (I mean to create them with one click from buidler). Just need to avoid the actual table creation...
Last updated
This >mjauvin said:
Maybe try this?
This needed some composer updates, did all, now I'm getting: Missing vendor files, try running "composer install" or use the Wizard installer.
I guess it removed carbon 1 and installed carbon 2.
mjauvin said:
Did you install october with composer?
Nope, I realized that was the problem. I got evertyhing removed, left only with the laravel package...
mjauvin said:
See here for switching to a composer install.
Note: To use composer with an October instance that has been installed using the Wizard installation, simply copy the tests/ directory and composer.json file from GitHub into your October instance and then run composer install.
Thank you. I had to move on and decided to create the migration files half manually... I already have them now. But I appreciate your help.
Last updated
1-10 of 10