-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapts frontend to have a copy of domains, to ease its development.
- Loading branch information
1 parent
4218828
commit 4b919bd
Showing
22 changed files
with
517 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddTagsTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('tags', static function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('name'); | ||
$table->timestamps(); | ||
$table->softDeletes(); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddLinksTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('links', static function (Blueprint $table) { | ||
$table->id(); | ||
$table->text('link'); | ||
$table->text('description'); | ||
$table->string('author_name'); | ||
$table->string('author_email'); | ||
$table->string('cover_image'); | ||
$table->timestamps(); | ||
$table->softDeletes(); | ||
$table->timestamp('approved_at')->nullable(); | ||
}); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
database/migrations/2020_03_19_202800_add_link_tag_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddLinkTagTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('link_tag', static function (Blueprint $table) { | ||
$table->id(); | ||
$table->foreignId('link_id')->constrained(); | ||
$table->foreignId('tag_id')->constrained(); | ||
}); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
database/migrations/2020_09_19_173727_add_title_column_to_links_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddTitleColumnToLinksTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::table('links', function (Blueprint $table) { | ||
$table->string('title')->nullable()->index(); | ||
}); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
database/migrations/2020_10_04_140743_create_users_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateUsersTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('users', function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('name')->index(); | ||
$table->string('email')->unique(); | ||
$table->string('password'); | ||
$table->boolean('trusted')->default(false); | ||
$table->timestampTz('email_verified_at')->nullable(); | ||
|
||
$table->timestampsTz(); | ||
$table->softDeletesTz(); | ||
}); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
database/migrations/2020_10_07_160608_alter_timestamps_columns_to_tags_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AlterTimestampsColumnsToTagsTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::table('tags', function (Blueprint $table) { | ||
$table->dateTimeTz("created_at")->change(); | ||
$table->dateTimeTz("updated_at")->change(); | ||
$table->dateTimeTz("deleted_at")->change(); | ||
}); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
database/migrations/2020_10_10_152640_alter_timestamps_columns_to_links_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AlterTimestampsColumnsToLinksTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::table('links', function (Blueprint $table) { | ||
$table->dateTimeTz("approved_at")->nullable()->change(); | ||
$table->dateTimeTz("created_at")->change(); | ||
$table->dateTimeTz("updated_at")->change(); | ||
$table->dateTimeTz("deleted_at")->change(); | ||
}); | ||
} | ||
} | ||
|
25 changes: 25 additions & 0 deletions
25
database/migrations/2020_10_12_104113_create_questions_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
use Domains\Accounts\Models\User; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateQuestionsTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('questions', function (Blueprint $table) { | ||
$table->id(); | ||
$table->unsignedInteger('author_id'); | ||
$table->string('title')->index(); | ||
$table->string('slug'); | ||
$table->text('description'); | ||
$table->timestampsTz(); | ||
$table->softDeletesTz(); | ||
$table->timestampTz('resolved_at')->nullable(); | ||
|
||
$table->index('author_id'); | ||
}); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
database/migrations/2020_10_14_133643_add_account_type_to_users_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddAccountTypeToUsersTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::table('users', function (Blueprint $table) { | ||
$table->enum('account_type', ['user', 'editor', 'admin'])->default('user')->after('id'); | ||
}); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
database/migrations/2020_10_19_175943_create_question_answers_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
use Domains\Accounts\Models\User; | ||
use Domains\Discussions\Models\Question; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateQuestionAnswersTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('question_answers', function (Blueprint $table) { | ||
$table->id(); | ||
$table->unsignedInteger('author_id'); | ||
$table->unsignedInteger('question_id'); | ||
$table->text('content'); | ||
$table->timestampsTz(); | ||
$table->softDeletesTz(); | ||
|
||
$table->index('question_id'); | ||
$table->index('author_id'); | ||
$table->index('created_at'); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.