diff --git a/composer.json b/composer.json index e1fb449..0080fda 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,7 @@ }, "require-dev": { "fakerphp/faker": "^1.9.1", + "kitloong/laravel-migrations-generator": "^7.0", "laravel/pint": "^1.0", "laravel/sail": "^1.18", "mockery/mockery": "^1.4.4", diff --git a/composer.lock b/composer.lock index 3ce6445..cbeda8f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aa322c53454393ed775cfe4807d54a50", + "content-hash": "5aba036ca136fdffa9f6b0e347b244ee", "packages": [ { "name": "brick/math", @@ -5871,6 +5871,79 @@ }, "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "kitloong/laravel-migrations-generator", + "version": "v7.0.1", + "source": { + "type": "git", + "url": "https://github.com/kitloong/laravel-migrations-generator.git", + "reference": "a21df90076f7c6c4325dded1ea7ed6d2ffb90c3d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kitloong/laravel-migrations-generator/zipball/a21df90076f7c6c4325dded1ea7ed6d2ffb90c3d", + "reference": "a21df90076f7c6c4325dded1ea7ed6d2ffb90c3d", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "illuminate/support": "^10.43|^11.0", + "php": "^8.1" + }, + "require-dev": { + "barryvdh/laravel-ide-helper": "^2.0|^3.0", + "friendsofphp/php-cs-fixer": "^3.1", + "larastan/larastan": "^1.0|^2.0", + "mockery/mockery": "^1.0", + "orchestra/testbench": "^8.0|^9.0", + "phpmd/phpmd": "^2.10", + "slevomat/coding-standard": "^8.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "KitLoong\\MigrationsGenerator\\MigrationsGeneratorServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "KitLoong\\MigrationsGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kit Loong", + "email": "kitloong1008@gmail.com" + } + ], + "description": "Generates Laravel Migrations from an existing database", + "keywords": [ + "artisan", + "generator", + "laravel", + "lumen", + "migration", + "migrations" + ], + "support": { + "issues": "https://github.com/kitloong/laravel-migrations-generator/issues", + "source": "https://github.com/kitloong/laravel-migrations-generator/tree/v7.0.1" + }, + "funding": [ + { + "url": "https://www.buymeacoffee.com/kitloong", + "type": "custom" + } + ], + "time": "2024-03-05T14:29:34+00:00" + }, { "name": "laravel/pint", "version": "v1.14.0", diff --git a/config/database.php b/config/database.php index 6336ccf..ae5aea6 100644 --- a/config/database.php +++ b/config/database.php @@ -57,6 +57,39 @@ 'collation' => 'utf8mb4_unicode_ci', ], + 'common' => [ + 'driver' => 'mysql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => 'common', + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + ], + + 'log' => [ + 'driver' => 'mysql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => 'log', + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + ], + + 'player' => [ + 'driver' => 'mysql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => 'player', + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + ], + ], /* diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php deleted file mode 100644 index 444fafb..0000000 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->string('name'); - $table->string('email')->unique(); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password'); - $table->rememberToken(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('users'); - } -}; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php deleted file mode 100644 index e828ad8..0000000 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->morphs('tokenable'); - $table->string('name'); - $table->string('token', 64)->unique(); - $table->text('abilities')->nullable(); - $table->timestamp('last_used_at')->nullable(); - $table->timestamp('expires_at')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('personal_access_tokens'); - } -}; diff --git a/database/migrations/2024_03_30_000000_create_account_account_table.php b/database/migrations/2024_03_30_000000_create_account_account_table.php new file mode 100644 index 0000000..c6fa015 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_account_account_table.php @@ -0,0 +1,49 @@ +create('account', function (Blueprint $table) { + $table->integer('id', true); + $table->string('login', 30)->default('')->unique('login'); + $table->string('password', 45)->default(''); + $table->string('social_id', 13)->default('')->index('social_id'); + $table->string('email', 64)->default(''); + $table->dateTime('create_time')->default('0000-00-00 00:00:00'); + $table->string('status', 8)->default('OK'); + $table->string('securitycode', 192)->nullable()->default(''); + $table->dateTime('availDt')->default('0000-00-00 00:00:00'); + $table->integer('mileage')->default(0); + $table->integer('cash')->default(0); + $table->dateTime('gold_expire')->default('0000-00-00 00:00:00'); + $table->dateTime('silver_expire')->default('0000-00-00 00:00:00'); + $table->dateTime('safebox_expire')->default('0000-00-00 00:00:00'); + $table->dateTime('autoloot_expire')->default('0000-00-00 00:00:00'); + $table->dateTime('fish_mind_expire')->default('0000-00-00 00:00:00'); + $table->dateTime('marriage_fast_expire')->default('0000-00-00 00:00:00'); + $table->dateTime('money_drop_rate_expire')->default('0000-00-00 00:00:00'); + $table->string('ip')->nullable(); + $table->dateTime('last_play'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('account')->dropIfExists('account'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_common_gmhost_table.php b/database/migrations/2024_03_30_000000_create_common_gmhost_table.php new file mode 100644 index 0000000..7f44bca --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_common_gmhost_table.php @@ -0,0 +1,30 @@ +create('gmhost', function (Blueprint $table) { + $table->string('mIP', 16)->default(''); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('common')->dropIfExists('gmhost'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_common_gmlist_table.php b/database/migrations/2024_03_30_000000_create_common_gmlist_table.php new file mode 100644 index 0000000..a4c2f9c --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_common_gmlist_table.php @@ -0,0 +1,35 @@ +create('gmlist', function (Blueprint $table) { + $table->increments('mID'); + $table->string('mAccount', 32)->default(''); + $table->string('mName', 32)->default(''); + $table->string('mContactIP', 16)->default(''); + $table->string('mServerIP', 16)->default('ALL'); + $table->enum('mAuthority', ['IMPLEMENTOR', 'HIGH_WIZARD', 'GOD', 'LOW_WIZARD', 'PLAYER'])->nullable()->default('PLAYER'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('common')->dropIfExists('gmlist'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_common_locale_table.php b/database/migrations/2024_03_30_000000_create_common_locale_table.php new file mode 100644 index 0000000..d54214f --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_common_locale_table.php @@ -0,0 +1,31 @@ +create('locale', function (Blueprint $table) { + $table->string('mKey')->default('')->primary(); + $table->string('mValue')->default(''); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('common')->dropIfExists('locale'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_common_spam_db_table.php b/database/migrations/2024_03_30_000000_create_common_spam_db_table.php new file mode 100644 index 0000000..0fac788 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_common_spam_db_table.php @@ -0,0 +1,32 @@ +create('spam_db', function (Blueprint $table) { + $table->set('type', ['GOOD', 'SPAM'])->default('SPAM'); + $table->string('word', 256)->primary(); + $table->integer('score')->default(10); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('common')->dropIfExists('spam_db'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_bootlog_table.php b/database/migrations/2024_03_30_000000_create_log_bootlog_table.php new file mode 100644 index 0000000..33296d8 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_bootlog_table.php @@ -0,0 +1,32 @@ +create('bootlog', function (Blueprint $table) { + $table->dateTime('time')->default('0000-00-00 00:00:00'); + $table->char('hostname', 128)->default('UNKNOWN'); + $table->boolean('channel')->default(false); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('bootlog'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_change_name_table.php b/database/migrations/2024_03_30_000000_create_log_change_name_table.php new file mode 100644 index 0000000..272be0e --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_change_name_table.php @@ -0,0 +1,34 @@ +create('change_name', function (Blueprint $table) { + $table->integer('pid')->nullable(); + $table->string('old_name')->nullable(); + $table->string('new_name')->nullable(); + $table->dateTime('time')->nullable(); + $table->string('ip', 20)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('change_name'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_command_log_table.php b/database/migrations/2024_03_30_000000_create_log_command_log_table.php new file mode 100644 index 0000000..10ed26e --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_command_log_table.php @@ -0,0 +1,37 @@ +create('command_log', function (Blueprint $table) { + $table->integer('id', true); + $table->integer('userid')->default(0); + $table->integer('server')->default(0); + $table->string('ip', 15)->default(''); + $table->integer('port')->default(0); + $table->string('username', 50)->default(''); + $table->text('command'); + $table->dateTime('date')->default('0000-00-00 00:00:00'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('command_log'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_cube_table.php b/database/migrations/2024_03_30_000000_create_log_cube_table.php new file mode 100644 index 0000000..bbc5bc6 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_cube_table.php @@ -0,0 +1,38 @@ +create('cube', function (Blueprint $table) { + $table->increments('id'); + $table->unsignedInteger('pid')->default(0)->index('pid'); + $table->dateTime('time')->default('0000-00-00 00:00:00'); + $table->unsignedInteger('x')->default(0); + $table->unsignedInteger('y')->default(0); + $table->unsignedInteger('item_vnum')->default(0)->index('item_vnum'); + $table->unsignedInteger('item_uid')->default(0)->index('item_uid'); + $table->unsignedInteger('item_count')->default(0); + $table->boolean('success')->default(false); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('cube'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_dragon_slay_log_table.php b/database/migrations/2024_03_30_000000_create_log_dragon_slay_log_table.php new file mode 100644 index 0000000..364ce0d --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_dragon_slay_log_table.php @@ -0,0 +1,33 @@ +create('dragon_slay_log', function (Blueprint $table) { + $table->unsignedInteger('guild_id'); + $table->unsignedInteger('vnum'); + $table->timestamp('start_time')->default('0000-00-00 00:00:00'); + $table->timestamp('end_time')->default('0000-00-00 00:00:00'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('dragon_slay_log'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_fish_log_table.php b/database/migrations/2024_03_30_000000_create_log_fish_log_table.php new file mode 100644 index 0000000..e21c608 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_fish_log_table.php @@ -0,0 +1,37 @@ +create('fish_log', function (Blueprint $table) { + $table->dateTime('time')->default('0000-00-00 00:00:00'); + $table->unsignedInteger('player_id')->default(0); + $table->tinyInteger('map_index')->default(0); + $table->unsignedInteger('fish_id')->default(0); + $table->integer('fishing_level')->default(0); + $table->integer('waiting_time')->default(0); + $table->tinyInteger('success')->default(0); + $table->smallInteger('size')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('fish_log'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_goldlog_table.php b/database/migrations/2024_03_30_000000_create_log_goldlog_table.php new file mode 100644 index 0000000..761a936 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_goldlog_table.php @@ -0,0 +1,35 @@ +create('goldlog', function (Blueprint $table) { + $table->string('date', 10)->default('0000-00-00')->index('date_idx'); + $table->string('time', 8)->default('00:00:00'); + $table->unsignedInteger('pid')->default(0)->index('pid_idx'); + $table->integer('what')->default(0)->index('what_idx'); + $table->set('how', ['BUY', 'SELL', 'SHOP_SELL', 'SHOP_BUY', 'EXCHANGE_TAKE', 'EXCHANGE_GIVE', 'QUEST'])->nullable()->index('how_idx'); + $table->string('hint', 50)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('goldlog'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_hack_crc_log_table.php b/database/migrations/2024_03_30_000000_create_log_hack_crc_log_table.php new file mode 100644 index 0000000..55d6b54 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_hack_crc_log_table.php @@ -0,0 +1,36 @@ +create('hack_crc_log', function (Blueprint $table) { + $table->dateTime('time')->default('0000-00-00 00:00:00'); + $table->char('login', 16)->default(''); + $table->char('name', 24)->default(''); + $table->char('ip', 15)->default(''); + $table->char('server', 100)->default(''); + $table->char('why')->default(''); + $table->integer('crc')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('hack_crc_log'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_hack_log_table.php b/database/migrations/2024_03_30_000000_create_log_hack_log_table.php new file mode 100644 index 0000000..78f7642 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_hack_log_table.php @@ -0,0 +1,35 @@ +create('hack_log', function (Blueprint $table) { + $table->dateTime('time')->default('0000-00-00 00:00:00'); + $table->char('login', 16)->default(''); + $table->char('name', 24)->default(''); + $table->char('ip', 15)->default(''); + $table->char('server', 100)->default(''); + $table->char('why')->default(''); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('hack_log'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_hackshield_log_table.php b/database/migrations/2024_03_30_000000_create_log_hackshield_log_table.php new file mode 100644 index 0000000..636e74c --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_hackshield_log_table.php @@ -0,0 +1,35 @@ +create('hackshield_log', function (Blueprint $table) { + $table->unsignedInteger('pid')->default(0); + $table->string('login', 32)->nullable(); + $table->unsignedInteger('account_id'); + $table->string('name', 25)->nullable(); + $table->dateTime('time')->default('0000-00-00 00:00:00'); + $table->string('reason', 25)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('hackshield_log'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_levellog_table.php b/database/migrations/2024_03_30_000000_create_log_levellog_table.php new file mode 100644 index 0000000..8138964 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_levellog_table.php @@ -0,0 +1,37 @@ +create('levellog', function (Blueprint $table) { + $table->char('name', 24)->default(''); + $table->tinyInteger('level')->default(0); + $table->dateTime('time')->default('0000-00-00 00:00:00'); + $table->integer('playtime')->default(0); + $table->integer('account_id'); + $table->integer('pid'); + + $table->primary(['name', 'level']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('levellog'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_log_table.php b/database/migrations/2024_03_30_000000_create_log_log_table.php new file mode 100644 index 0000000..4b3e789 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_log_table.php @@ -0,0 +1,39 @@ +create('log', function (Blueprint $table) { + $table->enum('type', ['ITEM', 'CHARACTER'])->default('ITEM'); + $table->dateTime('time')->default('0000-00-00 00:00:00'); + $table->unsignedInteger('who')->default(0)->index('who_idx'); + $table->unsignedInteger('x')->default(0); + $table->unsignedInteger('y')->default(0); + $table->integer('what')->default(0)->index('what_idx'); + $table->string('how', 50)->default('')->index('how_idx'); + $table->string('hint', 70)->nullable(); + $table->string('ip', 20)->nullable(); + $table->integer('vnum')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('log'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_loginlog2_table.php b/database/migrations/2024_03_30_000000_create_log_loginlog2_table.php new file mode 100644 index 0000000..6d5d5c6 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_loginlog2_table.php @@ -0,0 +1,40 @@ +create('loginlog2', function (Blueprint $table) { + $table->integer('id', true); + $table->text('type')->nullable(); + $table->integer('is_gm')->nullable(); + $table->dateTime('login_time')->nullable(); + $table->integer('channel')->nullable(); + $table->integer('account_id')->nullable(); + $table->integer('pid')->nullable(); + $table->text('client_version')->nullable(); + $table->text('ip')->nullable(); + $table->dateTime('logout_time')->nullable(); + $table->integer('playtime')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('loginlog2'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_loginlog_table.php b/database/migrations/2024_03_30_000000_create_log_loginlog_table.php new file mode 100644 index 0000000..4eacf4e --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_loginlog_table.php @@ -0,0 +1,39 @@ +create('loginlog', function (Blueprint $table) { + $table->enum('type', ['LOGIN', 'LOGOUT'])->nullable(); + $table->dateTime('time')->nullable(); + $table->tinyInteger('channel')->nullable(); + $table->unsignedInteger('account_id')->nullable(); + $table->unsignedInteger('pid')->nullable(); + $table->smallInteger('level')->nullable(); + $table->tinyInteger('job')->nullable(); + $table->unsignedInteger('playtime')->nullable(); + + $table->index(['pid', 'type'], 'pid'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('loginlog'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_money_log_table.php b/database/migrations/2024_03_30_000000_create_log_money_log_table.php new file mode 100644 index 0000000..3fd4f9c --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_money_log_table.php @@ -0,0 +1,35 @@ +create('money_log', function (Blueprint $table) { + $table->dateTime('time')->nullable(); + $table->enum('type', ['MONSTER', 'SHOP', 'REFINE', 'QUEST', 'GUILD', 'MISC', 'KILL', 'DROP'])->nullable(); + $table->integer('vnum')->default(0); + $table->integer('gold')->default(0); + + $table->index(['type', 'vnum'], 'type'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('money_log'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_playercount_table.php b/database/migrations/2024_03_30_000000_create_log_playercount_table.php new file mode 100644 index 0000000..e8b90e6 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_playercount_table.php @@ -0,0 +1,34 @@ +create('playercount', function (Blueprint $table) { + $table->dateTime('date')->nullable(); + $table->integer('count_red')->nullable(); + $table->integer('count_yellow')->nullable(); + $table->integer('count_blue')->nullable(); + $table->integer('count_total')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('playercount'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_quest_reward_log_table.php b/database/migrations/2024_03_30_000000_create_log_quest_reward_log_table.php new file mode 100644 index 0000000..40bdf5d --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_quest_reward_log_table.php @@ -0,0 +1,36 @@ +create('quest_reward_log', function (Blueprint $table) { + $table->string('quest_name', 32)->nullable(); + $table->unsignedInteger('player_id')->nullable()->index('player_id'); + $table->tinyInteger('player_level')->nullable(); + $table->enum('reward_type', ['EXP', 'ITEM'])->nullable(); + $table->unsignedInteger('reward_value1')->nullable(); + $table->integer('reward_value2')->nullable(); + $table->dateTime('time')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('quest_reward_log'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_refinelog_table.php b/database/migrations/2024_03_30_000000_create_log_refinelog_table.php new file mode 100644 index 0000000..2448270 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_refinelog_table.php @@ -0,0 +1,36 @@ +create('refinelog', function (Blueprint $table) { + $table->unsignedInteger('pid')->nullable(); + $table->string('item_name', 24)->default(''); + $table->integer('item_id')->default(0); + $table->string('step', 50)->default(''); + $table->dateTime('time')->default('0000-00-00 00:00:00'); + $table->boolean('is_success')->default(false); + $table->set('setType', ['SOCKET', 'POWER', 'ROD', 'GUILD', 'SCROLL', 'HYUNIRON', 'GOD_SCROLL', 'MUSIN_SCROLL'])->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('refinelog'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_shout_log_table.php b/database/migrations/2024_03_30_000000_create_log_shout_log_table.php new file mode 100644 index 0000000..6baa016 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_shout_log_table.php @@ -0,0 +1,33 @@ +create('shout_log', function (Blueprint $table) { + $table->dateTime('time')->nullable()->default('0000-00-00 00:00:00')->index('time_idx'); + $table->tinyInteger('channel')->nullable(); + $table->tinyInteger('empire')->nullable(); + $table->string('shout', 350)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('shout_log'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_log_speed_hack_table.php b/database/migrations/2024_03_30_000000_create_log_speed_hack_table.php new file mode 100644 index 0000000..c4e8d24 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_log_speed_hack_table.php @@ -0,0 +1,34 @@ +create('speed_hack', function (Blueprint $table) { + $table->integer('pid')->nullable(); + $table->dateTime('time')->nullable(); + $table->integer('x')->nullable(); + $table->integer('y')->nullable(); + $table->string('hack_count', 20)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('log')->dropIfExists('speed_hack'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_affect_table.php b/database/migrations/2024_03_30_000000_create_player_affect_table.php new file mode 100644 index 0000000..7a94fb3 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_affect_table.php @@ -0,0 +1,38 @@ +create('affect', function (Blueprint $table) { + $table->unsignedInteger('dwPID')->default(0); + $table->unsignedSmallInteger('bType')->default(0); + $table->unsignedTinyInteger('bApplyOn')->default(0); + $table->integer('lApplyValue')->default(0); + $table->unsignedInteger('dwFlag')->default(0); + $table->integer('lDuration')->default(0); + $table->integer('lSPCost')->default(0); + + $table->primary(['dwPID', 'bType', 'bApplyOn', 'lApplyValue']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('affect'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_banword_table.php b/database/migrations/2024_03_30_000000_create_player_banword_table.php new file mode 100644 index 0000000..fa975ae --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_banword_table.php @@ -0,0 +1,30 @@ +create('banword', function (Blueprint $table) { + $table->binary('word')->default('')->primary(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('banword'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_change_empire_table.php b/database/migrations/2024_03_30_000000_create_player_change_empire_table.php new file mode 100644 index 0000000..44d07ff --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_change_empire_table.php @@ -0,0 +1,32 @@ +create('change_empire', function (Blueprint $table) { + $table->integer('account_id')->default(0)->primary(); + $table->tinyInteger('change_count')->nullable(); + $table->dateTime('timestamp')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('change_empire'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_guild_comment_table.php b/database/migrations/2024_03_30_000000_create_player_guild_comment_table.php new file mode 100644 index 0000000..26750bd --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_guild_comment_table.php @@ -0,0 +1,37 @@ +create('guild_comment', function (Blueprint $table) { + $table->integer('id', true); + $table->unsignedInteger('guild_id')->nullable()->index('guild_id'); + $table->string('name', 8)->nullable(); + $table->tinyInteger('notice')->nullable(); + $table->string('content', 50)->nullable(); + $table->dateTime('time')->nullable(); + + $table->index(['notice', 'id', 'guild_id'], 'aaa'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('guild_comment'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_guild_grade_table.php b/database/migrations/2024_03_30_000000_create_player_guild_grade_table.php new file mode 100644 index 0000000..80406cf --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_guild_grade_table.php @@ -0,0 +1,35 @@ +create('guild_grade', function (Blueprint $table) { + $table->integer('guild_id')->default(0); + $table->tinyInteger('grade')->default(0); + $table->string('name', 8)->default(''); + $table->set('auth', ['ADD_MEMBER', 'REMOVE_MEMEBER', 'NOTICE', 'USE_SKILL'])->nullable(); + + $table->primary(['guild_id', 'grade']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('guild_grade'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_guild_member_table.php b/database/migrations/2024_03_30_000000_create_player_guild_member_table.php new file mode 100644 index 0000000..7390286 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_guild_member_table.php @@ -0,0 +1,36 @@ +create('guild_member', function (Blueprint $table) { + $table->unsignedInteger('pid')->default(0)->unique('pid'); + $table->unsignedInteger('guild_id')->default(0); + $table->tinyInteger('grade')->nullable(); + $table->boolean('is_general')->default(false); + $table->unsignedInteger('offer')->nullable(); + + $table->primary(['guild_id', 'pid']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('guild_member'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_guild_table.php b/database/migrations/2024_03_30_000000_create_player_guild_table.php new file mode 100644 index 0000000..8cf7c24 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_guild_table.php @@ -0,0 +1,42 @@ +create('guild', function (Blueprint $table) { + $table->increments('id'); + $table->string('name', 12)->default(''); + $table->smallInteger('sp')->default(1000); + $table->unsignedInteger('master')->default(0); + $table->tinyInteger('level')->nullable(); + $table->integer('exp')->nullable(); + $table->tinyInteger('skill_point')->default(0); + $table->binary('skill')->nullable(); + $table->integer('win')->default(0); + $table->integer('draw')->default(0); + $table->integer('loss')->default(0); + $table->integer('ladder_point')->default(0); + $table->integer('gold')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('guild'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_guild_war_bet_table.php b/database/migrations/2024_03_30_000000_create_player_guild_war_bet_table.php new file mode 100644 index 0000000..44afa86 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_guild_war_bet_table.php @@ -0,0 +1,35 @@ +create('guild_war_bet', function (Blueprint $table) { + $table->string('login', 24)->default(''); + $table->unsignedInteger('gold')->default(0); + $table->integer('guild')->default(0); + $table->unsignedInteger('war_id')->default(0); + + $table->primary(['war_id', 'login']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('guild_war_bet'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_guild_war_reservation_table.php b/database/migrations/2024_03_30_000000_create_player_guild_war_reservation_table.php new file mode 100644 index 0000000..1097e04 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_guild_war_reservation_table.php @@ -0,0 +1,45 @@ +create('guild_war_reservation', function (Blueprint $table) { + $table->increments('id'); + $table->unsignedInteger('guild1')->default(0); + $table->unsignedInteger('guild2')->default(0); + $table->dateTime('time')->default('0000-00-00 00:00:00'); + $table->unsignedTinyInteger('type')->default(0); + $table->unsignedInteger('warprice')->default(0); + $table->unsignedInteger('initscore')->default(0); + $table->boolean('started')->default(false); + $table->unsignedInteger('bet_from')->default(0); + $table->unsignedInteger('bet_to')->default(0); + $table->integer('winner')->default(-1); + $table->integer('power1')->default(0); + $table->integer('power2')->default(0); + $table->integer('handicap')->default(0); + $table->integer('result1')->default(0); + $table->integer('result2')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('guild_war_reservation'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_guild_war_table.php b/database/migrations/2024_03_30_000000_create_player_guild_war_table.php new file mode 100644 index 0000000..cbf21c3 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_guild_war_table.php @@ -0,0 +1,33 @@ +create('guild_war', function (Blueprint $table) { + $table->integer('id_from')->default(0); + $table->integer('id_to')->default(0); + + $table->primary(['id_from', 'id_to']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('guild_war'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_horse_name_table.php b/database/migrations/2024_03_30_000000_create_player_horse_name_table.php new file mode 100644 index 0000000..de0a2f3 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_horse_name_table.php @@ -0,0 +1,31 @@ +create('horse_name', function (Blueprint $table) { + $table->integer('id')->default(0)->primary(); + $table->string('name', 24)->default('NONAME'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('horse_name'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_item_attr_rare_table.php b/database/migrations/2024_03_30_000000_create_player_item_attr_rare_table.php new file mode 100644 index 0000000..5945c22 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_item_attr_rare_table.php @@ -0,0 +1,44 @@ +create('item_attr_rare', function (Blueprint $table) { + $table->enum('apply', ['MAX_HP', 'MAX_SP', 'CON', 'INT', 'STR', 'DEX', 'ATT_SPEED', 'MOV_SPEED', 'CAST_SPEED', 'HP_REGEN', 'SP_REGEN', 'POISON_PCT', 'STUN_PCT', 'SLOW_PCT', 'CRITICAL_PCT', 'PENETRATE_PCT', 'ATTBONUS_HUMAN', 'ATTBONUS_ANIMAL', 'ATTBONUS_ORC', 'ATTBONUS_MILGYO', 'ATTBONUS_UNDEAD', 'ATTBONUS_DEVIL', 'STEAL_HP', 'STEAL_SP', 'MANA_BURN_PCT', 'DAMAGE_SP_RECOVER', 'BLOCK', 'DODGE', 'RESIST_SWORD', 'RESIST_TWOHAND', 'RESIST_DAGGER', 'RESIST_BELL', 'RESIST_FAN', 'RESIST_BOW', 'RESIST_FIRE', 'RESIST_ELEC', 'RESIST_MAGIC', 'RESIST_WIND', 'REFLECT_MELEE', 'REFLECT_CURSE', 'POISON_REDUCE', 'KILL_SP_RECOVER', 'EXP_DOUBLE_BONUS', 'GOLD_DOUBLE_BONUS', 'ITEM_DROP_BONUS', 'POTION_BONUS', 'KILL_HP_RECOVER', 'IMMUNE_STUN', 'IMMUNE_SLOW', 'IMMUNE_FALL', 'SKILL', 'BOW_DISTANCE', 'ATT_GRADE_BONUS', 'DEF_GRADE_BONUS', 'MAGIC_ATT_GRADE', 'MAGIC_DEF_GRADE', 'CURSE_PCT', 'MAX_STAMINA', 'ATT_BONUS_TO_WARRIOR', 'ATT_BONUS_TO_ASSASSIN', 'ATT_BONUS_TO_SURA', 'ATT_BONUS_TO_SHAMAN', 'ATT_BONUS_TO_MONSTER', 'NORMAL_HIT_DEFEND_BONUS', 'SKILL_DEFEND_BONUS', 'NOUSE2\'\'NOUSE3', 'NOUSE4', 'NOUSE5', 'NOUSE6', 'NOUSE7', 'NOUSE8', 'NOUSE9', 'NOUSE10', 'NOUSE11', 'NOUSE12', 'NOUSE13', 'NOUSE14', 'RESIST_WARRIOR', 'RESIST_ASSASSIN', 'RESIST_SURA', 'RESIST_SHAMAN'])->default('MAX_HP'); + $table->string('prob', 100)->default(''); + $table->string('lv1', 100)->default(''); + $table->string('lv2', 100)->default(''); + $table->string('lv3', 100)->default(''); + $table->string('lv4', 100)->default(''); + $table->string('lv5', 100)->default(''); + $table->string('weapon', 100)->default(''); + $table->string('body', 100)->default(''); + $table->string('wrist', 100)->default(''); + $table->string('foots', 100)->default(''); + $table->string('neck', 100)->default(''); + $table->string('head', 100)->default(''); + $table->string('shield', 100)->default(''); + $table->string('ear', 100)->default(''); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('item_attr_rare'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_item_attr_table.php b/database/migrations/2024_03_30_000000_create_player_item_attr_table.php new file mode 100644 index 0000000..5c7303e --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_item_attr_table.php @@ -0,0 +1,44 @@ +create('item_attr', function (Blueprint $table) { + $table->enum('apply', ['MAX_HP', 'MAX_SP', 'CON', 'INT', 'STR', 'DEX', 'ATT_SPEED', 'MOV_SPEED', 'CAST_SPEED', 'HP_REGEN', 'SP_REGEN', 'POISON_PCT', 'STUN_PCT', 'SLOW_PCT', 'CRITICAL_PCT', 'PENETRATE_PCT', 'ATTBONUS_HUMAN', 'ATTBONUS_ANIMAL', 'ATTBONUS_ORC', 'ATTBONUS_MILGYO', 'ATTBONUS_UNDEAD', 'ATTBONUS_DEVIL', 'STEAL_HP', 'STEAL_SP', 'MANA_BURN_PCT', 'DAMAGE_SP_RECOVER', 'BLOCK', 'DODGE', 'RESIST_SWORD', 'RESIST_TWOHAND', 'RESIST_DAGGER', 'RESIST_BELL', 'RESIST_FAN', 'RESIST_BOW', 'RESIST_FIRE', 'RESIST_ELEC', 'RESIST_MAGIC', 'RESIST_WIND', 'REFLECT_MELEE', 'REFLECT_CURSE', 'POISON_REDUCE', 'KILL_SP_RECOVER', 'EXP_DOUBLE_BONUS', 'GOLD_DOUBLE_BONUS', 'ITEM_DROP_BONUS', 'POTION_BONUS', 'KILL_HP_RECOVER', 'IMMUNE_STUN', 'IMMUNE_SLOW', 'IMMUNE_FALL', 'SKILL', 'BOW_DISTANCE', 'ATT_GRADE_BONUS', 'DEF_GRADE_BONUS', 'MAGIC_ATT_GRADE', 'MAGIC_DEF_GRADE', 'CURSE_PCT', 'MAX_STAMINA', 'ATTBONUS_WARRIOR', 'ATTBONUS_ASSASSIN', 'ATTBONUS_SURA', 'ATTBONUS_SHAMAN', 'ATTBONUS_MONSTER', 'MALL_ATTBONUS', 'MALL_DEFBONUS', 'MALL_EXPBONUS', 'MALL_ITEMBONUS', 'MALL_GOLDBONUS', 'MAX_HP_PCT', 'MAX_SP_PCT', 'SKILL_DAMAGE_BONUS', 'NORMAL_HIT_DAMAGE_BONUS', 'SKILL_DEFEND_BONUS', 'NORMAL_HIT_DEFEND_BONUS', 'PC_BANG_EXP_BONUS', 'PC_BANG_DROP_BONUS', 'EXTRACT_HP_PCT', 'RESIST_WARRIOR', 'RESIST_ASSASSIN', 'RESIST_SURA', 'RESIST_SHAMAN', 'ENERGY', 'DEF_GRADE', 'COSTUME_ATTR_BONUS', 'MAGIC_ATTBONUS_PER', 'MELEE_MAGIC_ATTBONUS_PER', 'RESIST_ICE', 'RESIST_EARTH', 'RESIST_DARK', 'ANTI_CRITICAL_PCT', 'ANTI_PENETRATE_PCT'])->default('MAX_HP'); + $table->string('prob', 100)->default(''); + $table->string('lv1', 100)->default(''); + $table->string('lv2', 100)->default(''); + $table->string('lv3', 100)->default(''); + $table->string('lv4', 100)->default(''); + $table->string('lv5', 100)->default(''); + $table->string('weapon', 100)->default(''); + $table->string('body', 100)->default(''); + $table->string('wrist', 100)->default(''); + $table->string('foots', 100)->default(''); + $table->string('neck', 100)->default(''); + $table->string('head', 100)->default(''); + $table->string('shield', 100)->default(''); + $table->string('ear', 100)->default(''); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('item_attr'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_item_award_table.php b/database/migrations/2024_03_30_000000_create_player_item_award_table.php new file mode 100644 index 0000000..d6c1694 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_item_award_table.php @@ -0,0 +1,42 @@ +create('item_award', function (Blueprint $table) { + $table->integer('id', true); + $table->unsignedInteger('pid')->default(0)->index('pid_idx'); + $table->string('login', 30)->default(''); + $table->unsignedInteger('vnum')->default(0); + $table->unsignedInteger('count')->default(0); + $table->dateTime('given_time')->default('0000-00-00 00:00:00')->index('given_time_idx'); + $table->dateTime('taken_time')->nullable()->index('taken_time_idx'); + $table->integer('item_id')->nullable(); + $table->string('why', 128)->nullable(); + $table->integer('socket0')->default(0); + $table->integer('socket1')->default(0); + $table->integer('socket2')->default(0); + $table->boolean('mall')->default(false); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('item_award'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_item_proto_table.php b/database/migrations/2024_03_30_000000_create_player_item_proto_table.php new file mode 100644 index 0000000..5a940bc --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_item_proto_table.php @@ -0,0 +1,71 @@ +create('item_proto', function (Blueprint $table) { + $table->unsignedInteger('vnum')->default(0)->primary(); + $table->binary('name')->default('Noname'); + $table->binary('locale_name')->default('Noname'); + $table->tinyInteger('type')->default(0); + $table->tinyInteger('subtype')->default(0); + $table->tinyInteger('weight')->nullable()->default(0); + $table->tinyInteger('size')->nullable()->default(0); + $table->integer('antiflag')->nullable()->default(0); + $table->integer('flag')->nullable()->default(0); + $table->integer('wearflag')->nullable()->default(0); + $table->set('immuneflag', ['PARA', 'CURSE', 'STUN', 'SLEEP', 'SLOW', 'POISON', 'TERROR'])->default(''); + $table->integer('gold')->nullable()->default(0); + $table->unsignedInteger('shop_buy_price')->default(0); + $table->unsignedInteger('refined_vnum')->default(0); + $table->unsignedSmallInteger('refine_set')->default(0); + $table->unsignedSmallInteger('refine_set2')->default(0); + $table->tinyInteger('magic_pct')->default(0); + $table->tinyInteger('limittype0')->nullable()->default(0); + $table->integer('limitvalue0')->nullable()->default(0); + $table->tinyInteger('limittype1')->nullable()->default(0); + $table->integer('limitvalue1')->nullable()->default(0); + $table->tinyInteger('applytype0')->nullable()->default(0); + $table->integer('applyvalue0')->nullable()->default(0); + $table->tinyInteger('applytype1')->nullable()->default(0); + $table->integer('applyvalue1')->nullable()->default(0); + $table->tinyInteger('applytype2')->nullable()->default(0); + $table->integer('applyvalue2')->nullable()->default(0); + $table->integer('value0')->nullable()->default(0); + $table->integer('value1')->nullable()->default(0); + $table->integer('value2')->nullable()->default(0); + $table->integer('value3')->nullable()->default(0); + $table->integer('value4')->nullable()->default(0); + $table->integer('value5')->nullable()->default(0); + $table->tinyInteger('socket0')->nullable()->default(-1); + $table->tinyInteger('socket1')->nullable()->default(-1); + $table->tinyInteger('socket2')->nullable()->default(-1); + $table->tinyInteger('socket3')->nullable()->default(-1); + $table->tinyInteger('socket4')->nullable()->default(-1); + $table->tinyInteger('socket5')->nullable()->default(-1); + $table->tinyInteger('specular')->default(0); + $table->tinyInteger('socket_pct')->default(0); + $table->smallInteger('addon_type')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('item_proto'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_item_table.php b/database/migrations/2024_03_30_000000_create_player_item_table.php new file mode 100644 index 0000000..6102010 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_item_table.php @@ -0,0 +1,55 @@ +create('item', function (Blueprint $table) { + $table->increments('id'); + $table->unsignedInteger('owner_id')->default(0)->index('owner_id_idx'); + $table->enum('window', ['INVENTORY', 'EQUIPMENT', 'SAFEBOX', 'MALL', 'DRAGON_SOUL_INVENTORY', 'BELT_INVENTORY'])->default('INVENTORY'); + $table->unsignedSmallInteger('pos')->default(0); + $table->unsignedTinyInteger('count')->default(0); + $table->unsignedInteger('vnum')->default(0)->index(); + $table->unsignedInteger('socket0')->default(0); + $table->unsignedInteger('socket1')->default(0); + $table->unsignedInteger('socket2')->default(0); + $table->unsignedInteger('socket3')->default(0); + $table->unsignedInteger('socket4')->default(0); + $table->unsignedInteger('socket5')->default(0); + $table->tinyInteger('attrtype0')->default(0); + $table->smallInteger('attrvalue0')->default(0); + $table->tinyInteger('attrtype1')->default(0); + $table->smallInteger('attrvalue1')->default(0); + $table->tinyInteger('attrtype2')->default(0); + $table->smallInteger('attrvalue2')->default(0); + $table->tinyInteger('attrtype3')->default(0); + $table->smallInteger('attrvalue3')->default(0); + $table->tinyInteger('attrtype4')->default(0); + $table->smallInteger('attrvalue4')->default(0); + $table->tinyInteger('attrtype5')->default(0); + $table->smallInteger('attrvalue5')->default(0); + $table->tinyInteger('attrtype6')->default(0); + $table->smallInteger('attrvalue6')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('item'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_land_table.php b/database/migrations/2024_03_30_000000_create_player_land_table.php new file mode 100644 index 0000000..82d8485 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_land_table.php @@ -0,0 +1,39 @@ +create('land', function (Blueprint $table) { + $table->integer('id', true); + $table->integer('map_index')->default(0); + $table->integer('x')->default(0); + $table->integer('y')->default(0); + $table->integer('width')->default(0); + $table->integer('height')->default(0); + $table->unsignedInteger('guild_id')->default(0); + $table->tinyInteger('guild_level_limit')->default(0); + $table->unsignedInteger('price')->default(0); + $table->enum('enable', ['YES', 'NO'])->default('NO'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('land'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_lotto_list_table.php b/database/migrations/2024_03_30_000000_create_player_lotto_list_table.php new file mode 100644 index 0000000..918abca --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_lotto_list_table.php @@ -0,0 +1,33 @@ +create('lotto_list', function (Blueprint $table) { + $table->increments('id'); + $table->string('server', 20)->nullable(); + $table->unsignedInteger('pid')->nullable(); + $table->dateTime('time')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('lotto_list'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_marriage_table.php b/database/migrations/2024_03_30_000000_create_player_marriage_table.php new file mode 100644 index 0000000..334c6c4 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_marriage_table.php @@ -0,0 +1,36 @@ +create('marriage', function (Blueprint $table) { + $table->tinyInteger('is_married')->default(0); + $table->unsignedInteger('pid1')->default(0); + $table->unsignedInteger('pid2')->default(0); + $table->unsignedInteger('love_point')->nullable(); + $table->unsignedInteger('time')->default(0); + + $table->primary(['pid1', 'pid2']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('marriage'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_messenger_list_table.php b/database/migrations/2024_03_30_000000_create_player_messenger_list_table.php new file mode 100644 index 0000000..b0a2b99 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_messenger_list_table.php @@ -0,0 +1,33 @@ +create('messenger_list', function (Blueprint $table) { + $table->string('account', 16)->default(''); + $table->string('companion', 16)->default(''); + + $table->primary(['account', 'companion']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('messenger_list'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_mob_proto_table.php b/database/migrations/2024_03_30_000000_create_player_mob_proto_table.php new file mode 100644 index 0000000..6b653bb --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_mob_proto_table.php @@ -0,0 +1,101 @@ +create('mob_proto', function (Blueprint $table) { + $table->integer('vnum')->default(0)->primary(); + $table->string('name', 24)->default('Noname'); + $table->binary('locale_name')->default('Noname '); + $table->tinyInteger('rank')->default(0); + $table->tinyInteger('type')->default(0); + $table->boolean('battle_type')->default(false); + $table->smallInteger('level')->default(1); + $table->enum('size', ['SMALL', 'MEDIUM', 'BIG'])->nullable()->default('SMALL'); + $table->set('ai_flag', ['AGGR', 'NOMOVE', 'COWARD', 'NOATTSHINSU', 'NOATTCHUNJO', 'NOATTJINNO', 'ATTMOB', 'BERSERK', 'STONESKIN', 'GODSPEED', 'DEATHBLOW', 'REVIVE'])->nullable(); + $table->tinyInteger('mount_capacity')->default(0); + $table->set('setRaceFlag', ['ANIMAL', 'UNDEAD', 'DEVIL', 'HUMAN', 'ORC', 'MILGYO', 'INSECT', 'FIRE', 'ICE', 'DESERT', 'TREE', 'ATT_ELEC', 'ATT_FIRE', 'ATT_ICE', 'ATT_WIND', 'ATT_EARTH', 'ATT_DARK'])->default(''); + $table->set('setImmuneFlag', ['STUN', 'SLOW', 'FALL', 'CURSE', 'POISON', 'TERROR'])->default(''); + $table->tinyInteger('empire')->default(0); + $table->string('folder', 100)->default(''); + $table->tinyInteger('on_click')->default(0); + $table->unsignedSmallInteger('st')->default(0); + $table->unsignedSmallInteger('dx')->default(0); + $table->unsignedSmallInteger('ht')->default(0); + $table->unsignedSmallInteger('iq')->default(0); + $table->unsignedSmallInteger('damage_min')->default(0); + $table->unsignedSmallInteger('damage_max')->default(0); + $table->unsignedInteger('max_hp')->default(0); + $table->unsignedTinyInteger('regen_cycle')->default(0); + $table->unsignedTinyInteger('regen_percent')->default(0); + $table->integer('gold_min')->default(0); + $table->integer('gold_max')->default(0); + $table->unsignedInteger('exp')->default(0); + $table->unsignedSmallInteger('def')->default(0); + $table->unsignedSmallInteger('attack_speed')->default(100); + $table->unsignedSmallInteger('move_speed')->default(100); + $table->unsignedTinyInteger('aggressive_hp_pct')->default(0); + $table->unsignedSmallInteger('aggressive_sight')->default(0); + $table->unsignedSmallInteger('attack_range')->default(0); + $table->unsignedInteger('drop_item')->default(0); + $table->unsignedInteger('resurrection_vnum')->default(0); + $table->unsignedTinyInteger('enchant_curse')->default(0); + $table->unsignedTinyInteger('enchant_slow')->default(0); + $table->unsignedTinyInteger('enchant_poison')->default(0); + $table->unsignedTinyInteger('enchant_stun')->default(0); + $table->unsignedTinyInteger('enchant_critical')->default(0); + $table->unsignedTinyInteger('enchant_penetrate')->default(0); + $table->tinyInteger('resist_sword')->default(0); + $table->tinyInteger('resist_twohand')->default(0); + $table->tinyInteger('resist_dagger')->default(0); + $table->tinyInteger('resist_bell')->default(0); + $table->tinyInteger('resist_fan')->default(0); + $table->tinyInteger('resist_bow')->default(0); + $table->tinyInteger('resist_fire')->default(0); + $table->tinyInteger('resist_elect')->default(0); + $table->tinyInteger('resist_magic')->default(0); + $table->tinyInteger('resist_wind')->default(0); + $table->tinyInteger('resist_poison')->default(0); + $table->float('dam_multiply', null, 0)->nullable(); + $table->integer('summon')->nullable(); + $table->integer('drain_sp')->nullable(); + $table->unsignedInteger('mob_color')->nullable(); + $table->unsignedInteger('polymorph_item')->default(0); + $table->unsignedTinyInteger('skill_level0')->nullable(); + $table->unsignedInteger('skill_vnum0')->nullable(); + $table->unsignedTinyInteger('skill_level1')->nullable(); + $table->unsignedInteger('skill_vnum1')->nullable(); + $table->unsignedTinyInteger('skill_level2')->nullable(); + $table->unsignedInteger('skill_vnum2')->nullable(); + $table->unsignedTinyInteger('skill_level3')->nullable(); + $table->unsignedInteger('skill_vnum3')->nullable(); + $table->unsignedTinyInteger('skill_level4')->nullable(); + $table->unsignedInteger('skill_vnum4')->nullable(); + $table->tinyInteger('sp_berserk')->default(0); + $table->tinyInteger('sp_stoneskin')->default(0); + $table->tinyInteger('sp_godspeed')->default(0); + $table->tinyInteger('sp_deathblow')->default(0); + $table->tinyInteger('sp_revive')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('mob_proto'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_monarch_candidacy_table.php b/database/migrations/2024_03_30_000000_create_player_monarch_candidacy_table.php new file mode 100644 index 0000000..74e5e9a --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_monarch_candidacy_table.php @@ -0,0 +1,33 @@ +create('monarch_candidacy', function (Blueprint $table) { + $table->unsignedInteger('pid')->default(0)->primary(); + $table->dateTime('date')->nullable()->default('0000-00-00 00:00:00'); + $table->string('name', 16)->nullable(); + $table->dateTime('windate')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('monarch_candidacy'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_monarch_election_table.php b/database/migrations/2024_03_30_000000_create_player_monarch_election_table.php new file mode 100644 index 0000000..e88f4f1 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_monarch_election_table.php @@ -0,0 +1,32 @@ +create('monarch_election', function (Blueprint $table) { + $table->unsignedInteger('pid')->default(0)->primary(); + $table->unsignedInteger('selectedpid')->nullable()->default(0); + $table->dateTime('electiondata')->nullable()->default('0000-00-00 00:00:00'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('monarch_election'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_monarch_table.php b/database/migrations/2024_03_30_000000_create_player_monarch_table.php new file mode 100644 index 0000000..9b2e37e --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_monarch_table.php @@ -0,0 +1,33 @@ +create('monarch', function (Blueprint $table) { + $table->unsignedInteger('empire')->default(0)->primary(); + $table->unsignedInteger('pid')->nullable(); + $table->dateTime('windate')->nullable(); + $table->unsignedBigInteger('money')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('monarch'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_myshop_pricelist_table.php b/database/migrations/2024_03_30_000000_create_player_myshop_pricelist_table.php new file mode 100644 index 0000000..1ce4451 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_myshop_pricelist_table.php @@ -0,0 +1,34 @@ +create('myshop_pricelist', function (Blueprint $table) { + $table->unsignedInteger('owner_id')->default(0); + $table->unsignedInteger('item_vnum')->default(0); + $table->unsignedInteger('price')->default(0); + + $table->unique(['owner_id', 'item_vnum'], 'list_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('myshop_pricelist'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_object_proto_table.php b/database/migrations/2024_03_30_000000_create_player_object_proto_table.php new file mode 100644 index 0000000..a1cd45a --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_object_proto_table.php @@ -0,0 +1,43 @@ +create('object_proto', function (Blueprint $table) { + $table->unsignedInteger('vnum')->default(0)->primary(); + $table->string('name', 32)->default(''); + $table->unsignedInteger('price')->default(0); + $table->string('materials', 64)->default(''); + $table->unsignedInteger('upgrade_vnum')->default(0); + $table->unsignedInteger('upgrade_limit_time')->default(0); + $table->integer('life')->default(0); + $table->integer('reg_1')->default(0); + $table->integer('reg_2')->default(0); + $table->integer('reg_3')->default(0); + $table->integer('reg_4')->default(0); + $table->unsignedInteger('npc')->default(0); + $table->unsignedInteger('group_vnum')->default(0); + $table->unsignedInteger('dependent_group')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('object_proto'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_object_table.php b/database/migrations/2024_03_30_000000_create_player_object_table.php new file mode 100644 index 0000000..9cbb46b --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_object_table.php @@ -0,0 +1,39 @@ +create('object', function (Blueprint $table) { + $table->integer('id', true); + $table->integer('land_id')->default(0); + $table->unsignedInteger('vnum')->default(0); + $table->integer('map_index')->default(0); + $table->integer('x')->default(0); + $table->integer('y')->default(0); + $table->float('x_rot', null, 0)->default(0); + $table->float('y_rot', null, 0)->default(0); + $table->float('z_rot', null, 0)->default(0); + $table->integer('life')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('object'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_player_deleted_table.php b/database/migrations/2024_03_30_000000_create_player_player_deleted_table.php new file mode 100644 index 0000000..5ab2a9a --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_player_deleted_table.php @@ -0,0 +1,77 @@ +create('player_deleted', function (Blueprint $table) { + $table->integer('id', true); + $table->integer('account_id')->default(0)->index('account_id_idx'); + $table->string('name', 24)->default('NONAME')->index('name_idx'); + $table->unsignedTinyInteger('job')->default(0); + $table->boolean('voice')->unsigned()->default(false); + $table->tinyInteger('dir')->default(0); + $table->integer('x')->default(0); + $table->integer('y')->default(0); + $table->integer('z')->default(0); + $table->integer('map_index')->default(0); + $table->integer('exit_x')->default(0); + $table->integer('exit_y')->default(0); + $table->integer('exit_map_index')->default(0); + $table->smallInteger('hp')->default(0); + $table->smallInteger('mp')->default(0); + $table->smallInteger('stamina')->default(0); + $table->unsignedSmallInteger('random_hp')->default(0); + $table->unsignedSmallInteger('random_sp')->default(0); + $table->integer('playtime')->default(0); + $table->unsignedTinyInteger('level')->default(1); + $table->boolean('level_step')->default(false); + $table->smallInteger('st')->default(0); + $table->smallInteger('ht')->default(0); + $table->smallInteger('dx')->default(0); + $table->smallInteger('iq')->default(0); + $table->integer('exp')->default(0); + $table->integer('gold')->default(0); + $table->smallInteger('stat_point')->default(0); + $table->smallInteger('skill_point')->default(0); + $table->binary('quickslot')->nullable(); + $table->string('ip', 15)->nullable()->default('0.0.0.0'); + $table->mediumInteger('part_main')->default(0); + $table->tinyInteger('part_base')->default(0); + $table->mediumInteger('part_hair')->default(0); + $table->tinyInteger('skill_group')->default(0); + $table->binary('skill_level')->nullable(); + $table->integer('alignment')->default(0); + $table->dateTime('last_play')->default('0000-00-00 00:00:00'); + $table->boolean('change_name')->default(false); + $table->smallInteger('sub_skill_point')->default(0); + $table->tinyInteger('stat_reset_count')->default(0); + $table->smallInteger('horse_hp')->default(0); + $table->smallInteger('horse_stamina')->default(0); + $table->unsignedTinyInteger('horse_level')->default(0); + $table->unsignedInteger('horse_hp_droptime')->default(0); + $table->boolean('horse_riding')->default(false); + $table->smallInteger('horse_skill_point')->default(0); + $table->integer('bank_value')->nullable()->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('player_deleted'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_player_index_table.php b/database/migrations/2024_03_30_000000_create_player_player_index_table.php new file mode 100644 index 0000000..3ab6aa2 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_player_index_table.php @@ -0,0 +1,35 @@ +create('player_index', function (Blueprint $table) { + $table->integer('id')->default(0)->primary(); + $table->integer('pid1')->default(0)->index('pid1_key'); + $table->integer('pid2')->default(0)->index('pid2_key'); + $table->integer('pid3')->default(0)->index('pid3_key'); + $table->integer('pid4')->default(0)->index('pid4_key'); + $table->tinyInteger('empire')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('player_index'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_player_table.php b/database/migrations/2024_03_30_000000_create_player_player_table.php new file mode 100644 index 0000000..ee6ea2c --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_player_table.php @@ -0,0 +1,77 @@ +create('player', function (Blueprint $table) { + $table->integer('id', true); + $table->integer('account_id')->default(0)->index('account_id_idx'); + $table->string('name', 24)->default('NONAME')->index('name_idx'); + $table->unsignedTinyInteger('job')->default(0); + $table->boolean('voice')->unsigned()->default(false); + $table->tinyInteger('dir')->default(0); + $table->integer('x')->default(0); + $table->integer('y')->default(0); + $table->integer('z')->default(0); + $table->integer('map_index')->default(0); + $table->integer('exit_x')->default(0); + $table->integer('exit_y')->default(0); + $table->integer('exit_map_index')->default(0); + $table->smallInteger('hp')->default(0); + $table->smallInteger('mp')->default(0); + $table->smallInteger('stamina')->default(0); + $table->unsignedSmallInteger('random_hp')->default(0); + $table->unsignedSmallInteger('random_sp')->default(0); + $table->integer('playtime')->default(0); + $table->unsignedTinyInteger('level')->default(1); + $table->boolean('level_step')->default(false); + $table->smallInteger('st')->default(0); + $table->smallInteger('ht')->default(0); + $table->smallInteger('dx')->default(0); + $table->smallInteger('iq')->default(0); + $table->integer('exp')->default(0); + $table->integer('gold')->default(0); + $table->smallInteger('stat_point')->default(0); + $table->smallInteger('skill_point')->default(0); + $table->binary('quickslot')->nullable(); + $table->string('ip', 15)->nullable()->default('0.0.0.0'); + $table->integer('part_main')->default(0); + $table->integer('part_base')->default(0); + $table->integer('part_hair')->default(0); + $table->tinyInteger('skill_group')->default(0); + $table->binary('skill_level')->nullable(); + $table->integer('alignment')->default(0); + $table->dateTime('last_play')->default('0000-00-00 00:00:00'); + $table->boolean('change_name')->default(false); + $table->smallInteger('sub_skill_point')->default(0); + $table->tinyInteger('stat_reset_count')->default(0); + $table->smallInteger('horse_hp')->default(0); + $table->smallInteger('horse_stamina')->default(0); + $table->unsignedTinyInteger('horse_level')->default(0); + $table->unsignedInteger('horse_hp_droptime')->default(0); + $table->boolean('horse_riding')->default(false); + $table->smallInteger('horse_skill_point')->default(0); + $table->integer('bank_value')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('player'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_quest_table.php b/database/migrations/2024_03_30_000000_create_player_quest_table.php new file mode 100644 index 0000000..3f36a60 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_quest_table.php @@ -0,0 +1,35 @@ +create('quest', function (Blueprint $table) { + $table->unsignedInteger('dwPID')->default(0)->index('pid_idx'); + $table->string('szName', 32)->default('')->index('name_idx'); + $table->string('szState', 64)->default('')->index('state_idx'); + $table->integer('lValue')->default(0); + + $table->primary(['dwPID', 'szName', 'szState']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('quest'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_refine_proto_table.php b/database/migrations/2024_03_30_000000_create_player_refine_proto_table.php new file mode 100644 index 0000000..39731be --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_refine_proto_table.php @@ -0,0 +1,44 @@ +create('refine_proto', function (Blueprint $table) { + $table->integer('id', true); + $table->unsignedInteger('vnum0')->default(0); + $table->smallInteger('count0')->default(0); + $table->unsignedInteger('vnum1')->default(0); + $table->smallInteger('count1')->default(0); + $table->unsignedInteger('vnum2')->default(0); + $table->smallInteger('count2')->default(0); + $table->unsignedInteger('vnum3')->default(0); + $table->smallInteger('count3')->default(0); + $table->unsignedInteger('vnum4')->default(0); + $table->smallInteger('count4')->default(0); + $table->integer('cost')->default(0); + $table->unsignedInteger('src_vnum')->default(0); + $table->unsignedInteger('result_vnum')->default(0); + $table->smallInteger('prob')->default(100); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('refine_proto'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_safebox_table.php b/database/migrations/2024_03_30_000000_create_player_safebox_table.php new file mode 100644 index 0000000..35a5d55 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_safebox_table.php @@ -0,0 +1,33 @@ +create('safebox', function (Blueprint $table) { + $table->unsignedInteger('account_id')->default(0)->primary(); + $table->unsignedTinyInteger('size')->default(0); + $table->string('password', 6)->default(''); + $table->integer('gold')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('safebox'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_shop_item_table.php b/database/migrations/2024_03_30_000000_create_player_shop_item_table.php new file mode 100644 index 0000000..8c68b6d --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_shop_item_table.php @@ -0,0 +1,34 @@ +create('shop_item', function (Blueprint $table) { + $table->integer('shop_vnum')->default(0); + $table->integer('item_vnum')->default(0); + $table->unsignedTinyInteger('count')->default(1); + + $table->unique(['shop_vnum', 'item_vnum', 'count'], 'vnum_unique'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('shop_item'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_shop_table.php b/database/migrations/2024_03_30_000000_create_player_shop_table.php new file mode 100644 index 0000000..b44b20d --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_shop_table.php @@ -0,0 +1,32 @@ +create('shop', function (Blueprint $table) { + $table->integer('vnum')->default(0)->primary(); + $table->string('name', 32)->default('Noname'); + $table->smallInteger('npc_vnum')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('shop'); + } +}; diff --git a/database/migrations/2024_03_30_000000_create_player_skill_proto_table.php b/database/migrations/2024_03_30_000000_create_player_skill_proto_table.php new file mode 100644 index 0000000..c890503 --- /dev/null +++ b/database/migrations/2024_03_30_000000_create_player_skill_proto_table.php @@ -0,0 +1,60 @@ +create('skill_proto', function (Blueprint $table) { + $table->integer('dwVnum')->default(0)->primary(); + $table->string('szName', 32)->default(''); + $table->tinyInteger('bType')->default(0); + $table->tinyInteger('bLevelStep')->default(0); + $table->tinyInteger('bMaxLevel')->default(0); + $table->unsignedTinyInteger('bLevelLimit')->default(0); + $table->string('szPointOn', 100)->default('0'); + $table->string('szPointPoly', 100)->default(''); + $table->string('szSPCostPoly', 100)->default(''); + $table->string('szDurationPoly', 100)->default(''); + $table->string('szDurationSPCostPoly', 100)->default(''); + $table->string('szCooldownPoly', 100)->default(''); + $table->string('szMasterBonusPoly', 100)->default(''); + $table->string('szAttackGradePoly', 100)->default(''); + $table->set('setFlag', ['ATTACK', 'USE_MELEE_DAMAGE', 'COMPUTE_ATTGRADE', 'SELFONLY', 'USE_MAGIC_DAMAGE', 'USE_HP_AS_COST', 'COMPUTE_MAGIC_DAMAGE', 'SPLASH', 'GIVE_PENALTY', 'USE_ARROW_DAMAGE', 'PENETRATE', 'IGNORE_TARGET_RATING', 'ATTACK_SLOW', 'ATTACK_STUN', 'HP_ABSORB', 'SP_ABSORB', 'ATTACK_FIRE_CONT', 'REMOVE_BAD_AFFECT', 'REMOVE_GOOD_AFFECT', 'CRUSH', 'ATTACK_POISON', 'TOGGLE', 'DISABLE_BY_POINT_UP', 'CRUSH_LONG'])->nullable(); + $table->enum('setAffectFlag', ['YMIR', 'INVISIBILITY', 'SPAWN', 'POISON', 'SLOW', 'STUN', 'DUNGEON_READY', 'FORCE_VISIBLE', 'BUILDING_CONSTRUCTION_SMALL', 'BUILDING_CONSTRUCTION_LARGE', 'BUILDING_UPGRADE', 'MOV_SPEED_POTION', 'ATT_SPEED_POTION', 'FISH_MIDE', 'JEONGWIHON', 'GEOMGYEONG', 'CHEONGEUN', 'GYEONGGONG', 'EUNHYUNG', 'GWIGUM', 'TERROR', 'JUMAGAP', 'HOSIN', 'BOHO', 'KWAESOK', 'MANASHIELD', 'MUYEONG', 'REVIVE_INVISIBLE', 'FIRE', 'GICHEON', 'JEUNGRYEOK'])->default('YMIR'); + $table->string('szPointOn2', 100)->default('NONE'); + $table->string('szPointPoly2', 100)->default(''); + $table->string('szDurationPoly2', 100)->default(''); + $table->enum('setAffectFlag2', ['YMIR', 'INVISIBILITY', 'SPAWN', 'POISON', 'SLOW', 'STUN', 'DUNGEON_READY', 'FORCE_VISIBLE', 'BUILDING_CONSTRUCTION_SMALL', 'BUILDING_CONSTRUCTION_LARGE', 'BUILDING_UPGRADE', 'MOV_SPEED_POTION', 'ATT_SPEED_POTION', 'FISH_MIDE', 'JEONGWIHON', 'GEOMGYEONG', 'CHEONGEUN', 'GYEONGGONG', 'EUNHYUNG', 'GWIGUM', 'TERROR', 'JUMAGAP', 'HOSIN', 'BOHO', 'KWAESOK', 'MANASHIELD'])->default('YMIR'); + $table->string('szPointOn3', 100)->default('NONE'); + $table->string('szPointPoly3', 100)->default(''); + $table->string('szDurationPoly3', 100)->default(''); + $table->string('szGrandMasterAddSPCostPoly', 100)->default(''); + $table->integer('prerequisiteSkillVnum')->default(0); + $table->integer('prerequisiteSkillLevel')->default(0); + $table->enum('eSkillType', ['NORMAL', 'MELEE', 'RANGE', 'MAGIC'])->default('NORMAL'); + $table->tinyInteger('iMaxHit')->default(0); + $table->string('szSplashAroundDamageAdjustPoly', 100)->default('1'); + $table->integer('dwTargetRange')->default(1000); + $table->unsignedInteger('dwSplashRange')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('player')->dropIfExists('skill_proto'); + } +};