aboutsummaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
Diffstat (limited to 'database')
-rw-r--r--database/.gitignore1
-rw-r--r--database/factories/BookmarkCategoryFactory.php23
-rw-r--r--database/factories/BookmarkSiteFactory.php27
-rw-r--r--database/migrations/2024_02_13_230402_create_bookmark__categories_table.php29
-rw-r--r--database/migrations/2024_02_13_230457_create_bookmark__sites_table.php35
-rw-r--r--database/migrations/2024_02_25_151527_create_guestbook__entries_table.php32
-rw-r--r--database/seeders/BookmarkCategoriesTableSeeder.php30
7 files changed, 0 insertions, 177 deletions
diff --git a/database/.gitignore b/database/.gitignore
deleted file mode 100644
index 9b19b93..0000000
--- a/database/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.sqlite*
diff --git a/database/factories/BookmarkCategoryFactory.php b/database/factories/BookmarkCategoryFactory.php
deleted file mode 100644
index ca49ce5..0000000
--- a/database/factories/BookmarkCategoryFactory.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-namespace Database\Factories;
-
-use Illuminate\Database\Eloquent\Factories\Factory;
-
-/**
- * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\BookmarkCategory>
- */
-class BookmarkCategoryFactory extends Factory
-{
- /**
- * Define the model's default state.
- *
- * @return array<string, mixed>
- */
- public function definition(): array
- {
- return [
- 'name' => $this->faker->word,
- ];
- }
-}
diff --git a/database/factories/BookmarkSiteFactory.php b/database/factories/BookmarkSiteFactory.php
deleted file mode 100644
index c77c011..0000000
--- a/database/factories/BookmarkSiteFactory.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-namespace Database\Factories;
-
-use Illuminate\Database\Eloquent\Factories\Factory;
-use App\Models\BookmarkCategory;
-
-/**
- * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\BookmarkSite>
- */
-class BookmarkSiteFactory extends Factory
-{
- /**
- * Define the model's default state.
- *
- * @return array<string, mixed>
- */
- public function definition(): array
- {
- return [
- 'name' => $this->faker->name,
- 'description' => $this->faker->sentence,
- 'url' => $this->faker->url,
- 'category' => BookmarkCategory::factory(),
- ];
- }
-}
diff --git a/database/migrations/2024_02_13_230402_create_bookmark__categories_table.php b/database/migrations/2024_02_13_230402_create_bookmark__categories_table.php
deleted file mode 100644
index bb1799b..0000000
--- a/database/migrations/2024_02_13_230402_create_bookmark__categories_table.php
+++ /dev/null
@@ -1,29 +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.
- */
- public function up(): void
- {
- Schema::create('bookmark__categories', function (Blueprint $table) {
- $table->id();
- $table->string('name');
- $table->unsignedBigInteger('priority')->nullable();
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('bookmark__categories');
- }
-};
diff --git a/database/migrations/2024_02_13_230457_create_bookmark__sites_table.php b/database/migrations/2024_02_13_230457_create_bookmark__sites_table.php
deleted file mode 100644
index f016f43..0000000
--- a/database/migrations/2024_02_13_230457_create_bookmark__sites_table.php
+++ /dev/null
@@ -1,35 +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.
- */
- public function up(): void
- {
- Schema::create('bookmark__sites', function (Blueprint $table) {
- $table->id();
- $table->string('name');
- $table->text('description')->nullable();
- $table->string('url');
- $table->unsignedBigInteger('category');
- $table->foreign('category')
- ->references('id')
- ->on('bookmark__categories')
- ->onDelete('cascade');
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('bookmarks');
- }
-};
diff --git a/database/migrations/2024_02_25_151527_create_guestbook__entries_table.php b/database/migrations/2024_02_25_151527_create_guestbook__entries_table.php
deleted file mode 100644
index f1b2a11..0000000
--- a/database/migrations/2024_02_25_151527_create_guestbook__entries_table.php
+++ /dev/null
@@ -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.
- */
- public function up(): void
- {
- Schema::create('guestbook__entries', function (Blueprint $table) {
- $table->id();
- $table->string('name');
- $table->string('ip');
- $table->string('agent');
- $table->longText('message');
- $table->boolean('admin');
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('guestbook__entries');
- }
-};
diff --git a/database/seeders/BookmarkCategoriesTableSeeder.php b/database/seeders/BookmarkCategoriesTableSeeder.php
deleted file mode 100644
index 5c8ea2f..0000000
--- a/database/seeders/BookmarkCategoriesTableSeeder.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-namespace Database\Seeders;
-
-use App\Models\BookmarkCategory;
-use App\Models\BookmarkSite;
-use Illuminate\Database\Seeder;
-
-class BookmarkCategoriesTableSeeder extends Seeder
-{
- /**
- * Run the database seeds.
- */
- public function run(): void {
-// BookmarkCategory::factory()->count(5)->create()->each(function ($category) {
-// $category->sites()->saveMany(BookmarkSite::factory()->count(3)->make());
-// });
- $category = new BookmarkCategory([
- 'name' => 'cool people',
- ]);
- $category->save();
- $site = new BookmarkSite([
- 'name' => 'campos',
- 'description' => 'Cool brazilian dude, does programming and stuff',
- 'url' => 'https://campos02.me/',
- 'category' => 1,
- ]);
- $site->save();
- }
-}