updates
This commit is contained in:
76
app/database/migrations/2013_09_07_032049_create_tables.php
Normal file
76
app/database/migrations/2013_09_07_032049_create_tables.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateTables extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function($table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('email');
|
||||
$table->string('password');
|
||||
$table->boolean('admin');
|
||||
$table->text('settings');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('films', function($table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->bigInteger('tvdbid');
|
||||
$table->date('vorgeschlagen');
|
||||
$table->date('gesehen')->nullable();
|
||||
$table->integer('user');
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
|
||||
Schema::create('comments', function($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('user');
|
||||
$table->string('headline');
|
||||
$table->text('text');
|
||||
$table->integer('film');
|
||||
$table->integer('event');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('events', function($table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->date('datum');
|
||||
$table->text('beschreibung');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('votes', function($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('film');
|
||||
$table->integer('user');
|
||||
$table->boolean('stimme');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('users');
|
||||
Schema::drop('films');
|
||||
Schema::drop('comments');
|
||||
Schema::drop('events');
|
||||
Schema::drop('votes');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user