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