<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateAdminUpload extends Migration { public function up() { Schema::create('admin_upload', function (Blueprint $Beeb4) { $Beeb4->increments('id'); $Beeb4->timestamps(); $Beeb4->integer('userId')->nullable()->comment('用户ID'); $Beeb4->string('category', 10)->nullable()->comment('大类'); $Beeb4->integer('dataId')->nullable()->comment('文件ID'); $Beeb4->integer('uploadCategoryId')->nullable()->comment('分类ID'); $Beeb4->index(array('uploadCategoryId')); $Beeb4->index(array('userId', 'category')); }); Schema::create('admin_upload_category', function (Blueprint $Beeb4) { $Beeb4->increments('id'); $Beeb4->timestamps(); $Beeb4->integer('userId')->nullable()->comment('用户ID'); $Beeb4->string('category', 10)->nullable()->comment('大类'); $Beeb4->integer('pid')->nullable()->comment('上级分类'); $Beeb4->integer('sort')->nullable()->comment('排序'); $Beeb4->string('title', 50)->nullable()->comment('名称'); $Beeb4->index(array('userId', 'category')); }); } public function down() { } }