From 16989e3063d8450d435c2af168c4cfd0c33dbd85 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 13 Jan 2021 20:47:16 -0700 Subject: [PATCH] Add database migrations --- ..._12_14_103423_create_login_links_table.php | 40 +++++++++++++++++++ ...021_01_14_034521_add_cache_locks_table.php | 32 +++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 database/migrations/2020_12_14_103423_create_login_links_table.php create mode 100644 database/migrations/2021_01_14_034521_add_cache_locks_table.php diff --git a/database/migrations/2020_12_14_103423_create_login_links_table.php b/database/migrations/2020_12_14_103423_create_login_links_table.php new file mode 100644 index 000000000..404fac5d9 --- /dev/null +++ b/database/migrations/2020_12_14_103423_create_login_links_table.php @@ -0,0 +1,40 @@ +id(); + $table->string('key')->index(); + $table->string('secret')->index(); + $table->unsignedInteger('user_id')->index(); + $table->string('ip')->nullable(); + $table->string('user_agent')->nullable(); + $table->json('meta')->nullable(); + $table->timestamp('revoked_at')->nullable()->index(); + $table->timestamp('resent_at')->nullable()->index(); + $table->timestamp('used_at')->nullable()->index(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('login_links'); + } +} diff --git a/database/migrations/2021_01_14_034521_add_cache_locks_table.php b/database/migrations/2021_01_14_034521_add_cache_locks_table.php new file mode 100644 index 000000000..121c69a37 --- /dev/null +++ b/database/migrations/2021_01_14_034521_add_cache_locks_table.php @@ -0,0 +1,32 @@ +string('key')->primary(); + $table->string('owner'); + $table->integer('expiration'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropTable('cache_locks'); + } +}