initial commit
This commit is contained in:
0
database/migrations/.gitkeep
Normal file
0
database/migrations/.gitkeep
Normal file
34
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
34
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('password', 60);
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('users');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token')->index();
|
||||
$table->timestamp('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('password_resets');
|
||||
}
|
||||
}
|
||||
135
database/migrations/2015_11_07_012716_create_parseabc_tables.php
Normal file
135
database/migrations/2015_11_07_012716_create_parseabc_tables.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateParseabcTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('collections', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255)->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
Schema::create('collection_attributes', function (Blueprint $table) {
|
||||
$table->bigInteger('collection_id')->unsigned();
|
||||
$table->enum('type', ['Author','Composer','Discography','Rhythm','History','File','Book','Note','Source','Transcriber']);
|
||||
$table->string('string', 255);
|
||||
$table->tinyInteger('ordering')->unsigned()->default(0);
|
||||
$table->timestamps();
|
||||
$table->primary(['collection_id','type','ordering']);
|
||||
$table->foreign('collection_id')->references('id')->on('collections')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
// user profiles/roles/groups
|
||||
// Schema::create('Groups', function (Blueprint $table) {
|
||||
// $table->bigIncrements('id');
|
||||
// $table->string('name', 20);
|
||||
// $table->string('description', 100);
|
||||
// $table->timestamps();
|
||||
// });
|
||||
|
||||
Schema::create('persons', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 63);
|
||||
$table->string('email', 255);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('tunes', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->tinyInteger('x_id')->default('1');
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
|
||||
Schema::create('tune_settings', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('tune_id')->unsigned();
|
||||
$table->string('meter', 3)->default('C');
|
||||
$table->string('keysig',5)->default('C');
|
||||
$table->string('filename', 255)->nullable();
|
||||
$table->string('tempo', 10)->nullable();
|
||||
$table->string('L', 5)->nullable();
|
||||
$table->text('music')->nullable();
|
||||
$table->string('parts', 255)->nullable();
|
||||
$table->timestamps();
|
||||
$table->foreign('tune_id')->references('id')->on('tunes')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
Schema::create('tune_attributes', function (Blueprint $table) {
|
||||
$table->bigInteger('tune_id')->unsigned();
|
||||
$table->enum('type', ['Title','Group','Origin','Rhythm','History']);
|
||||
$table->string('string', 255);
|
||||
$table->tinyInteger('ordering')->unsigned()->default(0);
|
||||
$table->timestamps();
|
||||
$table->primary(['tune_id','type','ordering']);
|
||||
$table->foreign('tune_id')->references('id')->on('tunes')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('tune_books', function (Blueprint $table) {
|
||||
$table->bigInteger('collection_id')->unsigned();
|
||||
$table->bigInteger('setting_id')->unsigned();
|
||||
$table->timestamps();
|
||||
$table->primary(['collection_id','setting_id']);
|
||||
$table->foreign('collection_id')->references('id')->on('collections')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('setting_id')->references('id')->on('tune_settings')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('tune_persons', function (Blueprint $table) {
|
||||
$table->bigInteger('tune_id')->unsigned();
|
||||
$table->bigInteger('person_id')->unsigned();
|
||||
$table->enum('type', ['Author','Composer','Transcriber','']);
|
||||
$table->tinyInteger('ordering')->unsigned()->default(0);
|
||||
$table->timestamps();
|
||||
$table->primary(['tune_id','person_id','type','ordering']);
|
||||
$table->foreign('tune_id')->references('id')->on('tunes')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('person_id')->references('id')->on('persons')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('tune_setting_attributes', function (Blueprint $table) {
|
||||
$table->bigInteger('setting_id')->unsigned();
|
||||
$table->enum('type', ['Transcriber','Note','Discography','Source','Word','Book']);
|
||||
$table->string('string', 255);
|
||||
$table->tinyInteger('ordering')->unsigned()->default(0);
|
||||
$table->timestamps();
|
||||
$table->primary(['setting_id','type','ordering']);
|
||||
$table->foreign('setting_id')->references('id')->on('tune_settings')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('tune_setting_persons', function (Blueprint $table) {
|
||||
$table->bigInteger('setting_id')->unsigned();
|
||||
$table->bigInteger('person_id')->unsigned();
|
||||
$table->tinyInteger('ordering')->unsigned()->default(0);
|
||||
$table->timestamps();
|
||||
$table->primary(['setting_id','person_id','ordering']);
|
||||
$table->foreign('setting_id')->references('id')->on('tune_settings')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('person_id')->references('id')->on('persons')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('tune_setting_persons');
|
||||
Schema::drop('tune_setting_attributes');
|
||||
Schema::drop('tune_persons');
|
||||
Schema::drop('tune_books');
|
||||
Schema::drop('tune_attributes');
|
||||
// Schema::drop('Groups');
|
||||
Schema::drop('tune_settings');
|
||||
Schema::drop('tunes');
|
||||
Schema::drop('persons');
|
||||
Schema::drop('collections');
|
||||
}
|
||||
}
|
||||
37
database/migrations/2016_03_06_021725_create_jobs_table.php
Normal file
37
database/migrations/2016_03_06_021725_create_jobs_table.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue');
|
||||
$table->longText('payload');
|
||||
$table->tinyInteger('attempts')->unsigned();
|
||||
$table->tinyInteger('reserved')->unsigned();
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
$table->index(['queue', 'reserved', 'reserved_at']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('jobs');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateFailedJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->timestamp('failed_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('failed_jobs');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user