Sfoglia il codice sorgente

Merge branch 'develop'

xielin 5 anni fa
parent
commit
a0c1fdfb11

+ 39 - 0
database/migrations/2019_11_04_023522_add_column_lat_and_long_to_post.php

@@ -0,0 +1,39 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddColumnLatAndLongToPost extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('post', function (Blueprint $table) {
+            $table->decimal('lng',12,8)
+                ->after('location')
+                ->default(0)
+                ->comment('经度');
+            $table->decimal('lat',12,8)
+                ->after('lng')
+                ->default(0)
+                ->comment('维度');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('post', function (Blueprint $table) {
+            //
+        });
+    }
+}