feat: Implement soft deletes for workspace hashtags and labels, and integrate content_type into the initial post platforms table creation.
This commit is contained in:
parent
d538537706
commit
a7d88b8c47
6 changed files with 7 additions and 30 deletions
|
|
@ -6,11 +6,12 @@
|
|||
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',
|
||||
|
|
|
|||
|
|
@ -6,11 +6,12 @@
|
|||
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',
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ public function up(): void
|
|||
$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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -17,6 +17,7 @@ public function up(): void
|
|||
$table->string('name');
|
||||
$table->text('hashtags');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ public function up(): void
|
|||
$table->string('name');
|
||||
$table->string('color', 7);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue