-
-
Save kamaln7/5663076 to your computer and use it in GitHub Desktop.
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
<?php | |
use Illuminate\Database\Migrations\Migration; | |
class ImproveCfs extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* | |
* @return void | |
*/ | |
public function up() | |
{ | |
Schema::table('cfs', function ($table) { | |
$table->enum('type', array('file', 'folder', 'link'))->after('name'); | |
$table->string('mime')->nullable(); | |
$table->renameColumn('s3', 'cloud'); | |
}); | |
} | |
/** | |
* Reverse the migrations. | |
* | |
* @return void | |
*/ | |
public function down() | |
{ | |
Schema::table('cfs', function ($table) { | |
$table->dropColumn('type'); | |
$table->dropColumn('mime'); | |
$table->renameColumn('cloud', 's3'); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment