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