Refactor the database, in preparation to moving to postgresql

This commit is contained in:
Deon George
2022-10-23 13:46:46 +11:00
parent 2495e4675c
commit 5745c67538
45 changed files with 530 additions and 1553 deletions

View File

@@ -14,13 +14,11 @@ class UpdateUsers extends Migration
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('admin')->nullable();
$table->text('pgp_pubkey')->nullable();
$table->boolean('active')->default(TRUE);
$table->dateTime('last_on')->nullable();
});
Schema::table('systems', function (Blueprint $table) {
$table->dateTime('last_session')->nullable();
$table->string('alias')->nullable();
});
}
@@ -32,11 +30,8 @@ class UpdateUsers extends Migration
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn(['pgp_pubkey','active','last_on']);
});
Schema::table('systems', function (Blueprint $table) {
$table->dropColumn(['last_session']);
$table->dropColumn(['admin','pgp_pubkey','active','last_on']);
});
}
}