魔众积分商城系统数据库使用规范

魔众积分商城系统 / 文档中心
文档中心
开发教程
安装常见问题

目前使用 MySQL 作为默认数据库,创建数据库表时,请始终保持至少三个字段(主键、创建时间、更新时间)。

<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateXxx extends Migration
{
    public function up()
    {
        Schema::create('resume', function (Blueprint $table) {
            // 定义数据表主键ID
            $table->increments('id');
            // 定义数据表创建时间和更新时间 created_at 和 updated_at
            $table->timestamps();
            // 其他字段
        });
    }
    // ...
}

  • 表名:的使用 模块名_表名,格式为小写+下划线。
QQ
微信
公众号