Upgrade to Laravel 10
This commit is contained in:
parent
c4d7dc31d5
commit
16b120bc73
142 changed files with 1676 additions and 2019 deletions
|
@ -6,6 +6,9 @@ use App\Models\Article;
|
|||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Article>
|
||||
*/
|
||||
class ArticleFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -18,9 +21,9 @@ class ArticleFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'titleurl' => $this->faker->slug(3),
|
||||
|
|
|
@ -6,6 +6,9 @@ use App\Models\Bookmark;
|
|||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Bookmark>
|
||||
*/
|
||||
class BookmarkFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -18,9 +21,9 @@ class BookmarkFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
$now = Carbon::now()->subDays(rand(5, 15));
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@ use App\Models\Contact;
|
|||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Contact>
|
||||
*/
|
||||
class ContactFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -18,9 +21,9 @@ class ContactFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'nick' => mb_strtolower($this->faker->firstName),
|
||||
|
|
|
@ -6,6 +6,9 @@ use App\Models\Like;
|
|||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Like>
|
||||
*/
|
||||
class LikeFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -18,9 +21,9 @@ class LikeFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
$now = Carbon::now()->subDays(rand(5, 15));
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@ use App\Models\Media;
|
|||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Media>
|
||||
*/
|
||||
class MediaFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -18,9 +21,9 @@ class MediaFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'path' => 'media/' . $this->faker->uuid . '.jpg',
|
||||
|
|
|
@ -5,6 +5,9 @@ namespace Database\Factories;
|
|||
use App\Models\MicropubClient;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\MicropubClient>
|
||||
*/
|
||||
class MicropubClientFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -17,9 +20,9 @@ class MicropubClientFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'client_url' => $this->faker->url,
|
||||
|
|
|
@ -7,6 +7,9 @@ use Exception;
|
|||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Note>
|
||||
*/
|
||||
class NoteFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -19,11 +22,11 @@ class NoteFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
$now = Carbon::now()->subDays(random_int(5, 15));
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@ namespace Database\Factories;
|
|||
use App\Models\Place;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Place>
|
||||
*/
|
||||
class PlaceFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -17,9 +20,9 @@ class PlaceFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->company,
|
||||
|
|
|
@ -14,7 +14,7 @@ class SyndicationTargetFactory extends Factory
|
|||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'uid' => $this->faker->url,
|
||||
|
|
|
@ -5,6 +5,9 @@ namespace Database\Factories;
|
|||
use App\Models\Tag;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Tag>
|
||||
*/
|
||||
class TagFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -17,9 +20,9 @@ class TagFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'tag' => $this->faker->word,
|
||||
|
|
|
@ -6,6 +6,9 @@ use App\Models\User;
|
|||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -18,9 +21,9 @@ class UserFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
|
|
|
@ -5,6 +5,9 @@ namespace Database\Factories;
|
|||
use App\Models\WebMention;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\WebMention>
|
||||
*/
|
||||
class WebMentionFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
@ -17,9 +20,9 @@ class WebMentionFactory extends Factory
|
|||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'source' => $this->faker->url,
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateArticlesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (! Schema::hasTable('articles')) {
|
||||
Schema::create('articles', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('titleurl', 50)->unique();
|
||||
$table->string('url', 120)->nullable();
|
||||
$table->string('title');
|
||||
$table->longText('main');
|
||||
$table->tinyInteger('published')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('articles');
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateNotesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (! Schema::hasTable('notes')) {
|
||||
Schema::create('notes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->text('note');
|
||||
$table->string('in_reply_to')->nullable();
|
||||
$table->string('shorturl', 20)->nullable();
|
||||
$table->string('location')->nullable();
|
||||
$table->tinyInteger('photo')->nullable();
|
||||
$table->string('tweet_id')->nullable();
|
||||
$table->string('client_id')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('notes');
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateTagsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tags', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('tag');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('tags');
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateNoteTagTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('note_tag', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('note_id')->unsigned();
|
||||
$table->integer('tag_id')->unsigned();
|
||||
$table->foreign('note_id')->references('id')->on('notes');
|
||||
$table->foreign('tag_id')->references('id')->on('tags');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('note_tag');
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateContactsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('contacts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('nick');
|
||||
$table->string('name');
|
||||
$table->string('homepage')->nullable();
|
||||
$table->string('twitter')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('contacts');
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateWebMentionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('webmentions', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('source');
|
||||
$table->string('target');
|
||||
$table->integer('commentable_id')->nullable();
|
||||
$table->string('commentable_type')->nullable();
|
||||
$table->string('type')->nullable();
|
||||
$table->text('content')->nullable();
|
||||
$table->tinyInteger('verified')->default(1);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('webmentions');
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateClientsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('clients', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('client_url');
|
||||
$table->string('client_name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('clients');
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateMediaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('media', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->morphs('model');
|
||||
$table->string('collection_name');
|
||||
$table->string('name');
|
||||
$table->string('file_name');
|
||||
$table->string('disk');
|
||||
$table->unsignedInteger('size');
|
||||
$table->text('manipulations');
|
||||
$table->text('custom_properties');
|
||||
$table->unsignedInteger('order_column')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('media');
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreatePlacesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('places', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('slug')->unique();
|
||||
$table->text('description')->nullable();
|
||||
$table->text('location');
|
||||
$table->text('polygon')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('places');
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddPlaceRelationToNotes extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
$table->integer('place_id')->unsigned()->nullable();
|
||||
$table->foreign('place_id')->references('id')->on('places');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
$table->dropForeign('notes_place_id_foreign');
|
||||
$table->dropColumn('place_id');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddJsonbMf2ColumnToWebmentionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('webmentions', function (Blueprint $table) {
|
||||
$table->jsonb('mf2')->nullable();
|
||||
$table->index(['mf2']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('webmentions', function (Blueprint $table) {
|
||||
$table->dropIndex(['mf2']);
|
||||
$table->dropColumn('mf2');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CascadeDeleteNoteTags extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('note_tag', function ($table) {
|
||||
$table->dropForeign('note_tag_note_id_foreign');
|
||||
$table->foreign('note_id')->references('id')->on('notes')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddFacebookUrlColumnToNotes extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
$table->string('facebook_url')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddFacebookToContacts extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('contacts', function (Blueprint $table) {
|
||||
$table->string('facebook')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('contacts', function (Blueprint $table) {
|
||||
$table->dropColumn('facebook');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddSearchToNotes extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
DB::statement('ALTER TABLE notes ADD searchable tsvector NULL');
|
||||
DB::statement('CREATE INDEX notes_searchable_index ON notes USING GIN (searchable)');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
DB::statement('DROP INDEX IF EXISTS notes_searchable_index');
|
||||
DB::statement('ALTER TABLE notes DROP searchable');
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddIconToPlaces extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->string('icon')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->dropColumn('icon');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateMediaEndpointTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('media_endpoint', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->text('token')->nullable();
|
||||
$table->string('path');
|
||||
$table->string('type');
|
||||
$table->unsignedInteger('note_id')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index('token');
|
||||
$table->foreign('note_id')->references('id')->on('notes');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('media_endpoint', function (Blueprint $table) {
|
||||
$table->dropForeign(['note_id']);
|
||||
});
|
||||
Schema::dropIfExists('media_endpoint');
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateIndieWebUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('indie_web_users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('me')->unique();
|
||||
$table->text('token')->nullable();
|
||||
$table->string('syntax')->default('json');
|
||||
$table->jsonb('syndication')->nullable();
|
||||
$table->string('mediaEndpoint')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('indie_web_users');
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class UpdateNotesTableAddSwarmUrl extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
$table->string('swarm_url')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
$table->dropColumn('swarm_url');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class UpdatePlacesTableAddFoursquareColumn extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->string('foursquare')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->dropColumn('foursquare');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class UpdateNotesTableAddInstagramUrl extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
$table->string('instagram_url')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
$table->dropColumn('instagram_url');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class UpdatePlacesTableAddExternalUrls extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->jsonb('external_urls')->nullable();
|
||||
$table->index('external_urls');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->dropIndex('places_external_urls_index');
|
||||
$table->dropColumn('external_urls');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AllowEmptyNoteContent extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
DB::statement('ALTER TABLE notes ALTER note DROP NOT NULL');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
// we don’t reverse this because we can’t know if there
|
||||
// are NULL entries, in which case SET NOT NULL will fail
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class UpdateMediaEndpointTableAddNullableImageWidthColumn extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('media_endpoint', function (Blueprint $table) {
|
||||
$table->text('image_widths')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('media_endpoint', function (Blueprint $table) {
|
||||
$table->dropColumn('image_widths');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLikesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('likes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('url');
|
||||
$table->string('author_name')->nullable();
|
||||
$table->string('author_url')->nullable();
|
||||
$table->text('content')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('likes');
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBookmarksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('bookmarks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('url');
|
||||
$table->string('name')->nullable();
|
||||
$table->text('content')->nullable();
|
||||
$table->uuid('screenshot')->nullable();
|
||||
$table->string('archive')->nullable();
|
||||
$table->jsonb('syndicates')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('bookmarks');
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBookmarkTagPivotTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('bookmark_tag', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('bookmark_id');
|
||||
$table->unsignedInteger('tag_id');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('bookmark_id')->references('id')->on('bookmarks');
|
||||
$table->foreign('tag_id')->references('id')->on('tags');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('bookmark_tag');
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class UpdateModelsReferenceInWebmentionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('webmentions', function (Blueprint $table) {
|
||||
DB::statement("UPDATE webmentions SET commentable_type = 'App\\Models\\Note' WHERE commentable_type = 'App\\Note'");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('webmentions', function (Blueprint $table) {
|
||||
DB::statement("UPDATE webmentions SET commentable_type = 'App\\Note' WHERE commentable_type = 'App\\Models\\Note'");
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTelescopeEntriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* The database schema.
|
||||
*
|
||||
* @var Schema
|
||||
*/
|
||||
protected $schema;
|
||||
|
||||
/**
|
||||
* Create a new migration instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->schema = Schema::connection(
|
||||
config('telescope.storage.database.connection')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$this->schema->create('telescope_entries', function (Blueprint $table) {
|
||||
$table->bigIncrements('sequence');
|
||||
$table->uuid('uuid');
|
||||
$table->uuid('batch_id');
|
||||
$table->string('family_hash')->nullable()->index();
|
||||
$table->boolean('should_display_on_index')->default(true);
|
||||
$table->string('type', 20);
|
||||
$table->longText('content');
|
||||
$table->dateTime('created_at')->nullable();
|
||||
|
||||
$table->unique('uuid');
|
||||
$table->index('batch_id');
|
||||
$table->index(['type', 'should_display_on_index']);
|
||||
});
|
||||
|
||||
$this->schema->create('telescope_entries_tags', function (Blueprint $table) {
|
||||
$table->uuid('entry_uuid');
|
||||
$table->string('tag');
|
||||
|
||||
$table->index(['entry_uuid', 'tag']);
|
||||
$table->index('tag');
|
||||
|
||||
$table->foreign('entry_uuid')
|
||||
->references('uuid')
|
||||
->on('telescope_entries')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
$this->schema->create('telescope_monitoring', function (Blueprint $table) {
|
||||
$table->string('tag');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$this->schema->dropIfExists('telescope_entries_tags');
|
||||
$this->schema->dropIfExists('telescope_entries');
|
||||
$this->schema->dropIfExists('telescope_monitoring');
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name');
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddLatitudeLongitudeColumns extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->float('latitude')->nullable();
|
||||
$table->float('longitude')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->dropColumn('latitude');
|
||||
$table->dropColumn('longitude');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class RemoveLocationColumn extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('places', function (Blueprint $table) {
|
||||
$table->dropColumn('location');
|
||||
$table->dropColumn('polygon');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
DB::statement('DROP INDEX IF EXISTS notes_searchable_index');
|
||||
DB::statement('ALTER TABLE notes DROP searchable');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
|
@ -1,39 +0,0 @@
|
|||
<?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('syndication_targets', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uid');
|
||||
$table->string('name');
|
||||
$table->string('service_name')->nullable();
|
||||
$table->string('service_url')->nullable();
|
||||
$table->string('service_photo')->nullable();
|
||||
$table->string('user_name')->nullable();
|
||||
$table->string('user_url')->nullable();
|
||||
$table->string('user_photo')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('syndication_targets');
|
||||
}
|
||||
};
|
|
@ -1,32 +0,0 @@
|
|||
<?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::table('notes', function (Blueprint $table) {
|
||||
$table->string('mastodon_url')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('notes', function (Blueprint $table) {
|
||||
$table->dropColumn('mastodon_url');
|
||||
});
|
||||
}
|
||||
};
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
// This migration is not reversible.
|
||||
}
|
||||
};
|
|
@ -1,36 +0,0 @@
|
|||
<?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('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
};
|
1312
database/schema/pgsql-schema.sql
Normal file
1312
database/schema/pgsql-schema.sql
Normal file
File diff suppressed because it is too large
Load diff
|
@ -10,11 +10,9 @@ use Illuminate\Support\Facades\DB;
|
|||
class ArticlesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* Seed the articles table.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
$now = Carbon::now()->subMonth()->subDays(5);
|
||||
$articleFirst = Article::create([
|
||||
|
|
|
@ -9,11 +9,9 @@ use Illuminate\Database\Seeder;
|
|||
class BookmarksTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* Seed the bookmarks table.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
Bookmark::factory(10)
|
||||
->has(Tag::factory()->count(1))
|
||||
|
|
|
@ -10,11 +10,9 @@ use Illuminate\Support\Facades\DB;
|
|||
class ClientsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* Seed the clients table.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
DB::table('clients')->insert([
|
||||
'client_url' => 'https://jbl5.dev/notes/new',
|
||||
|
|
|
@ -9,11 +9,9 @@ use Illuminate\FileSystem\FileSystem;
|
|||
class ContactsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* Seed the contacts table.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
Contact::create([
|
||||
'nick' => 'tantek',
|
||||
|
|
|
@ -7,11 +7,9 @@ use Illuminate\Database\Seeder;
|
|||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
$this->call(ArticlesTableSeeder::class);
|
||||
$this->call(ClientsTableSeeder::class);
|
||||
|
|
|
@ -11,11 +11,9 @@ use Illuminate\Support\Facades\DB;
|
|||
class LikesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* Seed the likes table.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
Like::factory(10)->create();
|
||||
|
||||
|
|
|
@ -13,11 +13,9 @@ use SplFileInfo;
|
|||
class NotesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* Seed the notes table.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
$now = Carbon::now()->subDays(rand(2, 5));
|
||||
$noteTwitterReply = Note::create([
|
||||
|
|
|
@ -8,11 +8,9 @@ use Illuminate\Database\Seeder;
|
|||
class PlacesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* Seed the places table.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
$place = new Place();
|
||||
$place->name = 'The Bridgewater Pub';
|
||||
|
|
|
@ -8,11 +8,9 @@ use Illuminate\Support\Facades\DB;
|
|||
class UsersTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* Seed the users table.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
DB::table('users')->insert([
|
||||
'name' => 'jonny',
|
||||
|
|
|
@ -8,11 +8,9 @@ use Illuminate\Database\Seeder;
|
|||
class WebMentionsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* Seed the webmentions table.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
// WebMention Aaron
|
||||
WebMention::create([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue