This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/database/2016_09_19_114415_last_listened_music.php

49 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2016-09-19 09:51:43 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Sakura\DB;
class LastListenedMusic extends Migration
{
/**
* Run the migrations.
* @return void
*/
public function up()
{
$schema = DB::getSchemaBuilder();
$schema->table('users', function (Blueprint $table) {
2016-09-19 15:33:52 +00:00
$table->text('user_music_track')
2016-09-19 09:51:43 +00:00
->nullable();
2016-09-19 15:33:52 +00:00
$table->text('user_music_artist')
2016-09-19 09:51:43 +00:00
->nullable();
2016-09-19 15:33:52 +00:00
$table->integer('user_music_check')
->default(0);
2016-09-19 09:51:43 +00:00
2016-09-19 15:33:52 +00:00
$table->boolean('user_music_listening')
->default(false);
2016-09-19 09:51:43 +00:00
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
$schema = DB::getSchemaBuilder();
$schema->table('users', function (Blueprint $table) {
$table->dropColumn([
2016-09-19 15:33:52 +00:00
'user_music_track',
'user_music_artist',
'user_music_check',
'user_music_listening',
2016-09-19 09:51:43 +00:00
]);
});
}
}