Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

feat: Implement soft deletes for workspace hashtags and labels, and integrate content_type into the initial post platforms table creation.

Paulo Castellanoa7d88b8c4735
diff --git a/app/Models/WorkspaceHashtag.php b/app/Models/WorkspaceHashtag.php
index 5f4f2becd..269129d1a 100644
--- a/app/Models/WorkspaceHashtag.php
+++ b/app/Models/WorkspaceHashtag.php
@@ -6,11 +6,12 @@ use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\SoftDeletes;
class WorkspaceHashtag extends Model
{
/** @use HasFactory<\Database\Factories\WorkspaceHashtagFactory> */
- use HasFactory, HasUuids;
+ use HasFactory, HasUuids, SoftDeletes;
protected $fillable = [
'workspace_id',
diff --git a/app/Models/WorkspaceLabel.php b/app/Models/WorkspaceLabel.php
index 72a08a2e0..20f1323a2 100644
--- a/app/Models/WorkspaceLabel.php
+++ b/app/Models/WorkspaceLabel.php
@@ -6,11 +6,12 @@ use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\SoftDeletes;
class WorkspaceLabel extends Model
{
/** @use HasFactory<\Database\Factories\WorkspaceLabelFactory> */
- use HasFactory, HasUuids;
+ use HasFactory, HasUuids, SoftDeletes;
protected $fillable = [
'workspace_id',
diff --git a/database/migrations/2026_01_14_232319_create_post_platforms_table.php b/database/migrations/2026_01_14_232319_create_post_platforms_table.php
index 093a8009c..01bd10ff7 100644
--- a/database/migrations/2026_01_14_232319_create_post_platforms_table.php
+++ b/database/migrations/2026_01_14_232319_create_post_platforms_table.php
@@ -17,6 +17,7 @@ return new class extends Migration
$table->uuid('social_account_id');
$table->string('platform');
$table->text('content')->nullable();
+ $table->string('content_type');
$table->string('status')->default('pending');
$table->string('platform_post_id')->nullable();
$table->boolean('enabled');
diff --git a/database/migrations/2026_01_17_150140_add_content_type_to_post_platforms_table.php b/database/migrations/2026_01_17_150140_add_content_type_to_post_platforms_table.php
deleted file mode 100644
index 666b67d13..000000000
--- a/database/migrations/2026_01_17_150140_add_content_type_to_post_platforms_table.php
+++ /dev/null
@@ -1,28 +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::table('post_platforms', function (Blueprint $table) {
- $table->string('content_type')->nullable()->after('content');
- });
- }
-
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::table('post_platforms', function (Blueprint $table) {
- $table->dropColumn('content_type');
- });
- }
-};
diff --git a/database/migrations/2026_01_17_152319_create_workspace_hashtags_table.php b/database/migrations/2026_01_17_152319_create_workspace_hashtags_table.php
index c0803b9b3..c5f025c8d 100644
--- a/database/migrations/2026_01_17_152319_create_workspace_hashtags_table.php
+++ b/database/migrations/2026_01_17_152319_create_workspace_hashtags_table.php
@@ -17,6 +17,7 @@ return new class extends Migration
$table->string('name');
$table->text('hashtags');
$table->timestamps();
+ $table->softDeletes();
});
}
diff --git a/database/migrations/2026_01_17_153347_create_workspace_labels_table.php b/database/migrations/2026_01_17_153347_create_workspace_labels_table.php
index 7789f28bc..499191021 100644
--- a/database/migrations/2026_01_17_153347_create_workspace_labels_table.php
+++ b/database/migrations/2026_01_17_153347_create_workspace_labels_table.php
@@ -17,6 +17,7 @@ return new class extends Migration
$table->string('name');
$table->string('color', 7);
$table->timestamps();
+ $table->softDeletes();
});
}