diff --git a/app/IOType.php b/app/IOType.php new file mode 100644 index 0000000..6577d36 --- /dev/null +++ b/app/IOType.php @@ -0,0 +1,10 @@ +tinyInteger('io_type'); + $table->integer('io_type')->unsigned(); + $table->foreign('io_type')->references('id')->on('io_types') + ->onDelete('no action'); // A reference text which describes the target $table->string('reference'); diff --git a/database/migrations/2018_09_07_075622_create_io_types_table.php b/database/migrations/2018_09_07_075622_create_io_types_table.php new file mode 100644 index 0000000..26326d4 --- /dev/null +++ b/database/migrations/2018_09_07_075622_create_io_types_table.php @@ -0,0 +1,34 @@ +increments('id'); + + $table->string('type') + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('io_types'); + } +}