@@ -42,19 +42,19 @@ return new class () extends Migration {
42
42
43
43
Schema::create(config('filamentblog.tables.prefix').'category_'.config('filamentblog.tables.prefix').'post', function (Blueprint $table) {
44
44
$table->id();
45
- $table->foreignIdFor(Firefly\FilamentBlog\Models\Post::class )
46
- ->constrained()
45
+ $table->foreignId( "post_id" )
46
+ ->constrained(table: config('filamentblog.tables.prefix').'posts' )
47
47
->cascadeOnDelete();
48
- $table->foreignIdFor(Firefly\FilamentBlog\Models\Category::class )
49
- ->constrained()
48
+ $table->foreignId("category_id" )
49
+ ->constrained(table: config('filamentblog.tables.prefix').'categories' )
50
50
->cascadeOnDelete();
51
51
$table->timestamps();
52
52
});
53
53
54
54
Schema::create(config('filamentblog.tables.prefix').'seo_details', function (Blueprint $table) {
55
55
$table->id();
56
- $table->foreignIdFor(Firefly\FilamentBlog\Models\Post::class )
57
- ->constrained()
56
+ $table->foreignId("post_id" )
57
+ ->constrained(table: config('filamentblog.tables.prefix').'posts' )
58
58
->cascadeOnDelete();
59
59
$table->string('title');
60
60
$table->json('keywords')->nullable();
@@ -65,8 +65,8 @@ return new class () extends Migration {
65
65
Schema::create(config('filamentblog.tables.prefix').'comments', function (Blueprint $table) {
66
66
$table->id();
67
67
$table->foreignId(config('filamentblog.user.foreign_key'));
68
- $table->foreignIdFor(Firefly\FilamentBlog\Models\Post::class )
69
- ->constrained()
68
+ $table->foreignId("post_id" )
69
+ ->constrained(table: config('filamentblog.tables.prefix').'posts' )
70
70
->cascadeOnDelete();
71
71
$table->text('comment');
72
72
$table->boolean('approved')->default(false);
@@ -90,11 +90,11 @@ return new class () extends Migration {
90
90
91
91
Schema::create(config('filamentblog.tables.prefix').'post_'.config('filamentblog.tables.prefix').'tag', function (Blueprint $table) {
92
92
$table->id();
93
- $table->foreignIdFor(Firefly\FilamentBlog\Models\Post::class )
94
- ->constrained()
93
+ $table->foreignId("post_id" )
94
+ ->constrained(table: config('filamentblog.tables.prefix').'posts' )
95
95
->cascadeOnDelete();
96
- $table->foreignIdFor(Firefly\FilamentBlog\Models\Tag::class )
97
- ->constrained()
96
+ $table->foreignId("tag_id" )
97
+ ->constrained(table: config('filamentblog.tables.prefix').'tags' )
98
98
->cascadeOnDelete();
99
99
$table->timestamps();
100
100
});
0 commit comments