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

<?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) {
$table->text('user_music_track')
->nullable();
$table->text('user_music_artist')
->nullable();
$table->integer('user_music_check')
->default(0);
$table->boolean('user_music_listening')
->default(false);
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
$schema = DB::getSchemaBuilder();
$schema->table('users', function (Blueprint $table) {
$table->dropColumn([
'user_music_track',
'user_music_artist',
'user_music_check',
'user_music_listening',
]);
});
}
}