<commit_before><?php

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

class PwAdminAuth extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        /*

            // 原始 pw9 sql:

            DROP TABLE IF EXISTS `pw_application`;
            CREATE TABLE `pw_application` (
              `app_id` char(20) NOT NULL COMMENT '应用id',
              `name` varchar(100) NULL DEFAULT '' COMMENT '名称',
              `alias` varchar(100) NULL DEFAULT '' COMMENT '别名',
              `logo` varchar(100) NULL DEFAULT '' COMMENT '应用logo',
              `author_name` varchar(30) NULL DEFAULT '' COMMENT '作者名',
              `author_icon` varchar(100) NULL DEFAULT '' COMMENT '作者头像',
              `author_email` varchar(200) NULL DEFAULT '' COMMENT '作者email',
              `website` varchar(200) NULL DEFAULT '' COMMENT '开发者网站',
              `version` varchar(50) NULL DEFAULT '' COMMENT '应用版本',
              `pwversion` varchar(50) NULL DEFAULT '',
              `created_time` int(10)   NULL DEFAULT '0' COMMENT '创建时间',
              `modified_time` int(10) unsigned NULL DEFAULT '0' COMMENT '修改时间',
              `status` tinyint(1) NULL DEFAULT '0',
              `description` varchar(255) NULL DEFAULT '' COMMENT '描述',
              PRIMARY KEY (`app_id`),
              UNIQUE KEY `alias` (`alias`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='本地应用信息表';

         */
        Schema::create('pw_application', function (Blueprint $table) {
            if (env('DB_CONNECTION', false) === 'mysql') {
                $table->engine = 'InnoDB';
            }

            $table->integer('app_id')->nullable()->default(0)->comment('应用id');
            $table->string('name', 100)->nullable()->default('')->comment('名称');
            $table->string('alias', 100)->nullable()->default('')->comment('别名');
            $table->string('logo', 100)->nullable()->default('')->comment('应用logo');
            $table->string('author_name', 30)->nullable()->default('')->comment('作者名');
            $table->string('author_icon', 100)->nullable()->default('')->comment('作者头像');
            $table->string('author_email', 200)->nullable()->default('')->comment('作者email');
            $table->string('website', 200)->nullable()->default('')->comment('开发者网站');
            $table->string('version', 50)->nullable()->default('')->comment('应用版本');
            $table->string('pwversion', 50)->nullable()->default('')->comment('');
            $table->integer('created_time', 10)->nullable()->default('0')->comment('创建时间');
            $table->integer('modified_time', 10)->unsigned()->default('0')->comment('修改时间');
            $table->tinyInteger('status', 1)->nullable()->default('0')->comment('作者email');
            $table->string('description', 255)->nullable()->default('')->comment('描述');
            $table->primary('app_id');
            $table->unique('alias');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('pw_application');
    }
}
<commit_msg>修改为正确的名称<commit_after><?php

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

class PwApplication extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        /*

            // 原始 pw9 sql:

            DROP TABLE IF EXISTS `pw_application`;
            CREATE TABLE `pw_application` (
              `app_id` char(20) NOT NULL COMMENT '应用id',
              `name` varchar(100) NULL DEFAULT '' COMMENT '名称',
              `alias` varchar(100) NULL DEFAULT '' COMMENT '别名',
              `logo` varchar(100) NULL DEFAULT '' COMMENT '应用logo',
              `author_name` varchar(30) NULL DEFAULT '' COMMENT '作者名',
              `author_icon` varchar(100) NULL DEFAULT '' COMMENT '作者头像',
              `author_email` varchar(200) NULL DEFAULT '' COMMENT '作者email',
              `website` varchar(200) NULL DEFAULT '' COMMENT '开发者网站',
              `version` varchar(50) NULL DEFAULT '' COMMENT '应用版本',
              `pwversion` varchar(50) NULL DEFAULT '',
              `created_time` int(10)   NULL DEFAULT '0' COMMENT '创建时间',
              `modified_time` int(10) unsigned NULL DEFAULT '0' COMMENT '修改时间',
              `status` tinyint(1) NULL DEFAULT '0',
              `description` varchar(255) NULL DEFAULT '' COMMENT '描述',
              PRIMARY KEY (`app_id`),
              UNIQUE KEY `alias` (`alias`)
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='本地应用信息表';

         */
        Schema::create('pw_application', function (Blueprint $table) {
            if (env('DB_CONNECTION', false) === 'mysql') {
                $table->engine = 'InnoDB';
            }

            $table->char('app_id', 20)->comment('应用ID');
            $table->string('name', 100)->nullable()->default('')->comment('名称');
            $table->string('alias', 100)->nullable()->default('')->comment('别名');
            $table->string('logo', 100)->nullable()->default('')->comment('应用logo');
            $table->string('author_name', 30)->nullable()->default('')->comment('作者名');
            $table->string('author_icon', 100)->nullable()->default('')->comment('作者头像');
            $table->string('author_email', 200)->nullable()->default('')->comment('作者email');
            $table->string('website', 200)->nullable()->default('')->comment('开发者网站');
            $table->string('version', 50)->nullable()->default('')->comment('应用版本');
            $table->string('pwversion', 50)->nullable()->default('')->comment('');
            $table->integer('created_time', 10)->nullable()->default('0')->comment('创建时间');
            $table->integer('modified_time', 10)->unsigned()->default('0')->comment('修改时间');
            $table->tinyInteger('status', 1)->nullable()->default('0')->comment('作者email');
            $table->string('description', 255)->nullable()->default('')->comment('描述');

            $table->primary('app_id');
            $table->unique('alias');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('pw_application');
    }
}

{'fraction_non_alphanumeric': 0.1873532634215057, 'fraction_numerical': 0.023634371576146503, 'mean_word_length': 2.493712411153636, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3426328', 'n_tokens_mistral': 1970, 'n_tokens_neox': 1894, 'n_words': 347}