2020_01_07_144431_yz_picture_album.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class YzPictureAlbum extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. //
  15. if (!Schema::hasTable('yz_picture_album')) {
  16. Schema::create('yz_picture_album', function (Blueprint $table) {
  17. $table->integer('id', true);
  18. $table->integer('uniacid')->nullable();
  19. $table->integer('goods_id')->nullable()->comment('商品id');
  20. $table->string('picture_name')->nullable()->comment('画册名称');
  21. $table->string('picture_peo')->nullable()->comment('浏览人数');
  22. $table->string('color')->nullable()->comment('背景颜色');
  23. $table->tinyInteger('is_background')->nullable()->comment('1背景颜色,2背景图');
  24. $table->string('background_thumb')->nullable()->comment('背景图片');
  25. $table->string('audio_url')->nullable()->comment('音频链接');
  26. $table->string('code')->nullable()->comment('客服二维码');
  27. $table->string('phone')->nullable()->comment('客服电话');
  28. $table->string('title')->nullable()->comment('分享标题');
  29. $table->string('describe')->nullable()->comment('描述');
  30. $table->string('share_picture')->nullable()->comment('分享图片');
  31. $table->integer('created_at')->nullable();
  32. $table->integer('updated_at')->nullable();
  33. $table->tinyInteger('is_open')->nullable();
  34. });
  35. \Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix()
  36. . "yz_picture_album` comment '智能画册--画册表'");
  37. }
  38. }
  39. /**
  40. * Reverse the migrations.
  41. *
  42. * @return void
  43. */
  44. public function down()
  45. {
  46. //
  47. }
  48. }