Redo database migrations for pgsql
This commit is contained in:
43
database/migrations/0095-create_provider_oauth.php
Normal file
43
database/migrations/0095-create_provider_oauth.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('provider_oauth', function(Blueprint $table)
|
||||
{
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->integer('site_id')->unsigned();
|
||||
$table->boolean('active')->default(false);
|
||||
|
||||
$table->string('name',32);
|
||||
$table->string('app_id',128);
|
||||
$table->string('secret',128);
|
||||
|
||||
$table->foreign(['site_id'])->references(['id'])->on('sites');
|
||||
|
||||
$table->unique(['id','site_id']);
|
||||
$table->unique(['site_id','name']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('provider_oauth');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user