mysql-workbench-export-laravel-5-migrations: Error during "Export Laravel 5 Migration"
I installed this plugin as described in documentation file . I tried to export my database using
tools->catalog->export laravel 5 migration
but it’s showing error
error calling Python module function GenerateLaravel5Migration.generate_laravel5_migration
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 4
- Comments: 34 (5 by maintainers)
Commits related to this issue
- Updates - Added testing Model - Fix for #18 - Fixed issues with 'CURRENT_TIMESTAMP', 'NULL ON UPDATE CURRENT_TIMESTAMP', 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP' - Check for non existing colu... — committed to VeeeneX/mysql-workbench-export-laravel-5-migrations by VeeeneX 8 years ago
- Updates - Added testing Model - Fix for #18 - Fixed issues with 'CURRENT_TIMESTAMP', 'NULL ON UPDATE CURRENT_TIMESTAMP', 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP' - Check for non existing colu... — committed to VeeeneX/mysql-workbench-export-laravel-5-migrations by VeeeneX 8 years ago
- Fixes and Updates (#20) * Updates - Added testing Model - Fix for #18 - Fixed issues with 'CURRENT_TIMESTAMP', 'NULL ON UPDATE CURRENT_TIMESTAMP', 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP... — committed to beckenrode/mysql-workbench-export-laravel-5-migrations by VeeeneX 8 years ago
- Possible fix for #18 Check if referencedColumns exists — committed to beckenrode/mysql-workbench-export-laravel-5-migrations by beckenrode 8 years ago
- Feature/remeber token (#39) * Updates - Added testing Model - Fix for #18 - Fixed issues with 'CURRENT_TIMESTAMP', 'NULL ON UPDATE CURRENT_TIMESTAMP', 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMES... — committed to beckenrode/mysql-workbench-export-laravel-5-migrations by VeeeneX 7 years ago
In case others have an issue - I also ran into the same error @namelus and others reported.
TLDR; Removing foreign keys with unmatched tables resolved the issue for me.
I discovered MySQL WB created foreign keys that didn’t have corresponding tables. When I created my tables, I used the dropper tool to select the columns to create the relationships. Initially they were non-identifying relationships, then I changed them to identifying relationships.
In troubleshooting this issue, I looked at the table properties in the Model tab and I saw one set of relationships that corresponded properly to tables and one set that didn’t have tables matched to them.
When I removed the unmatched relationships, the migration files were generated properly with the expected foreign keys.
@beckenrode Excellent… It’s working now Thank you so much …