Created
May 29, 2013 18:01
-
-
Save clone1018/5672345 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Schema::create('cfs_folders', function($table) { | |
$table->increments('id'); | |
$table->string('name'); | |
$table->integer('parent_id')->unsigned()->nullable(); | |
$table->integer('user_id')->unsigned(); | |
$table->timestamps(); | |
$table->foreign('user_id')->references('id')->on('users'); | |
$table->foreign('parent_id')->references('id')->on('cfs_folders'); | |
}); | |
Schema::create('cfs_files', function($table) { | |
$table->increments('id'); | |
$table->string('name', 255); | |
$table->integer('folder_id')->unsigned()->nullable(); | |
$table->integer('user_id')->unsigned(); | |
$table->string('mime'); | |
$table->boolean('secure'); | |
$table->string('visibility'); | |
$table->integer('size'); | |
$table->boolean('cloud'); | |
$table->text('misc'); // Misc json_encode'd data | |
$table->timestamps(); | |
$table->foreign('user_id')->references('id')->on('users'); | |
$table->foreign('folder_id')->references('id')->on('cfs_folders'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment