2019_07_01_105904_create_website_info.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateWebsiteInfo extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. // 从0~65535全部是标准端口,但是从0~1024号端口是系统端口,用户无法修改
  15. //从1025~65534端口是系统为用户预留的端口,而65535号端口为系统保留
  16. if (!Schema::hasTable('yz_website_info')) {
  17. Schema::create('yz_website_info', function (Blueprint $table) {
  18. $table->increments('id');
  19. $table->integer('uniacid')->nullable()->default(0);
  20. $table->string('website_url')->nullable()->default(0)->comment('站点');
  21. $table->string('founder_account',50)->nullable()->default(0)->comment('创始人账号');
  22. $table->string('founder_password',50)->nullable()->default(0)->comment('创始人密码');
  23. $table->string('server_ip',50)->nullable()->default(0)->comment('服务器IP');
  24. $table->string('root_password',50)->nullable()->default(0)->comment('服务器root密码');
  25. $table->string('ssh_port',50)->nullable()->default(0)->comment('ssh 端口');
  26. $table->string('database_address',50)->nullable()->default(0)->comment('数据库访问地址');
  27. $table->string('database_username',50)->nullable()->default(0)->comment('数据库用户名');
  28. $table->string('database_password',50)->nullable()->default(0)->comment('数据库密码');
  29. $table->string('root_directory',50)->nullable()->default(0)->comment('网站根目录');
  30. $table->string('qq',50)->nullable()->default(0)->comment('联系qq');
  31. $table->string('mobile',50)->nullable()->default(0)->comment('联系手机号');
  32. $table->integer('created_at')->nullable();
  33. $table->integer('updated_at')->nullable();
  34. });
  35. \Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix()
  36. . "yz_website_info comment '工单管理--加密信息'");
  37. }
  38. }
  39. /**
  40. * Reverse the migrations.
  41. *
  42. * @return void
  43. */
  44. public function down()
  45. {
  46. //
  47. }
  48. }