Backend for songs.zachdecook.com
* Create songs table
| -rw-r--r-- | laravel/database/migrations/2018_12_26_145136_create_songs_table.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/laravel/database/migrations/2018_12_26_145136_create_songs_table.php b/laravel/database/migrations/2018_12_26_145136_create_songs_table.php new file mode 100644 index 0000000..7208806 --- /dev/null +++ b/laravel/database/migrations/2018_12_26_145136_create_songs_table.php @@ -0,0 +1,37 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateSongsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('songs', function (Blueprint $table) { + $table->increments('id'); + $table->string('number', 5); + $table->string('title'); + $table->string('author'); + $table->string('verse'); + $table->string('key', 5); + $table->text('text'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('songs'); + } +} |