Refactor the database, in preparation to moving to postgresql
This commit is contained in:
47
database/migrations/2022_10_22_001403_protocols_software.php
Normal file
47
database/migrations/2022_10_22_001403_protocols_software.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ProtocolsSoftware extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('protocols', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name');
|
||||
$table->integer('port')->nullable();
|
||||
$table->boolean('active');
|
||||
});
|
||||
|
||||
Schema::create('software', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name');
|
||||
$table->boolean('active');
|
||||
|
||||
$table->integer('code')->nullable(); // Mailer/Tosser Product Code
|
||||
$table->integer('type'); // Mailer/Tosser
|
||||
|
||||
$table->unique(['code','type']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('protocols');
|
||||
Schema::dropIfExists('software');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user