<?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 $tkusQ) { $tkusQ->increments('id'); $tkusQ->timestamps(); $tkusQ->integer('userId')->nullable()->comment('用户ID'); $tkusQ->string('category', 10)->nullable()->comment('大类'); $tkusQ->integer('dataId')->nullable()->comment('文件ID'); $tkusQ->integer('uploadCategoryId')->nullable()->comment('分类ID'); $tkusQ->index(array('uploadCategoryId')); $tkusQ->index(array('userId', 'category')); }); Schema::create('admin_upload_category', function (Blueprint $tkusQ) { $tkusQ->increments('id'); $tkusQ->timestamps(); $tkusQ->integer('userId')->nullable()->comment('用户ID'); $tkusQ->string('category', 10)->nullable()->comment('大类'); $tkusQ->integer('pid')->nullable()->comment('上级分类'); $tkusQ->integer('sort')->nullable()->comment('排序'); $tkusQ->string('title', 50)->nullable()->comment('名称'); $tkusQ->index(array('userId', 'category')); }); } public function down() { } }