Skip to content

Commit

Permalink
fix: Merged migrations file into one, use and setup tiptap editor
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniputra committed May 6, 2024
1 parent 70e5c9c commit bac058d
Show file tree
Hide file tree
Showing 20 changed files with 1,157 additions and 874 deletions.
61 changes: 61 additions & 0 deletions database/migrations/2024_04_10_000005_create_ngeblog_tables.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?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('ngeblog_posts', function (Blueprint $table) {
$table->id();
$table->foreignId('author_id')
->nullable()
->constrained('users')
->nullOnDelete();
$table->string('title');
$table->string('slug')->unique();
$table->boolean('is_visible')->default(false);
$table->string('content_type')->default('richtext');
$table->string('cover_image_path')->nullable();
$table->timestamp('first_published_at')->nullable();
$table->timestamp('schedule_publish_at')->nullable();
$table->text('excerpt')->nullable();
$table->longText('content');
$table->timestamps();
$table->softDeletes();
});

Schema::create('ngeblog_tags', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->string('slug')->unique();
$table->boolean('is_visible')->default(false);
$table->text('description')->nullable();
$table->timestamps();
});

Schema::create('ngeblog_post_tag', function (Blueprint $table) {
$table->id();
$table->foreignId('post_id')->constrained('ngeblog_posts')->cascadeOnDelete();
$table->foreignId('tag_id')->constrained('ngeblog_tags')->cascadeOnDelete();
$table->timestamps();

$table->unique(['post_id', 'tag_id']);
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('ngeblog_posts');
Schema::dropIfExists('ngeblog_tags');
Schema::dropIfExists('ngeblog_post_tag');
}
};
38 changes: 0 additions & 38 deletions database/migrations/2024_04_10_000005_create_posts_table.php

This file was deleted.

31 changes: 0 additions & 31 deletions database/migrations/2024_04_10_000006_create_tags_table.php

This file was deleted.

31 changes: 0 additions & 31 deletions database/migrations/2024_04_10_000007_create_post_tag_table.php

This file was deleted.

670 changes: 0 additions & 670 deletions dist/ngeblog-admin-assets/Form-CYgZVxY9.js

This file was deleted.

121 changes: 121 additions & 0 deletions dist/ngeblog-admin-assets/Form-uqNag5Jn.js

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions dist/ngeblog-admin-assets/Form.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ngeblog-admin-assets/ngeblog.css

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions dist/ngeblog-admin-assets/ngeblog.js

Large diffs are not rendered by default.

Loading

0 comments on commit bac058d

Please sign in to comment.