Skip to content

Instantly share code, notes, and snippets.

@colbyr
Created April 21, 2013 21:07
Show Gist options
  • Save colbyr/5431070 to your computer and use it in GitHub Desktop.
Save colbyr/5431070 to your computer and use it in GitHub Desktop.
<?php
// migration
DB::query('ALTER TABLE users MODIFY first_name VARCHAR(255) DEFAULT NULL');
DB::query('ALTER TABLE users MODIFY last_name VARCHAR(255) DEFAULT NULL');
// rollback
DB::query('ALTER TABLE users MODIFY first_name VARCHAR(255) NOT NULL');
DB::query('ALTER TABLE users MODIFY last_name VARCHAR(255) NOT NULL');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment