Skip to content
Advertisement

Tag: database-migration

Make column not nullable in a Laravel migration

I’m writing a migration to make certain columns in a table nullable right now. For the down function, I of course want to make those columns not nullable again. I looked through the schema builder docs, but couldn’t see a way to do this. Any help would be appreciated. Answer Prior to Laravel 5, there was no Laravel native way

Importing records from PostgreSQL to MySQL

Was wondering if anyone had any insight or recommended tools for exporting the records from a PostgreSQL database and importing them into a MySQL database. I believe the table structure is 100% identical. Thoughts? Thanks! Answer The command will generate SQL-standard-compliant INSERT statements with all column names listed and one VALUES clause per INSERT. This is the most portable way

Advertisement