Просмотр исходного кода

:construction: migrate SentSim

visuddhinanda 4 лет назад
Родитель
Сommit
144f6b2d59

+ 11 - 0
app/Models/SentSim.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Model;
+
+class SentSim extends Model
+{
+    use HasFactory;
+}

+ 35 - 0
database/migrations/2021_12_29_030034_create_sent_sims_table.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateSentSimsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('sent_sims', function (Blueprint $table) {
+            $table->id();
+            $table->integer('sent1')->index();
+            $table->integer('sent2');
+            $table->float('sim');
+			$table->timestamp('created_at')->useCurrent();
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('sent_sims');
+    }
+}