Created
April 3, 2017 11:06
-
-
Save dragg/dcf6a768a09581a2fa7a2fd8e3e20963 to your computer and use it in GitHub Desktop.
Laravel migration - changing enum field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB::statement("ALTER TABLE $TABLE_NAME$ CHANGE $FIELD_NAME$ type ENUM($ENUM_PREVIOUS_OPTION_1$, $ENUM_PREVIOUS_OPTION_2$)"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB::statement("ALTER TABLE $TABLE_NAME$ CHANGE $FIELD_NAME$ type ENUM($ENUM_PREVIOUS_OPTION_1$, $ENUM_PREVIOUS_OPTION_2$, $ENUM_OPTION_NEW$)"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment