Added sticker details migration file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s

This commit is contained in:
dhanabalan
2026-08-04 15:30:11 +05:30
parent 44204df962
commit a3b96cbded

View File

@@ -0,0 +1,67 @@
<?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
{
$sql = <<<'SQL'
CREATE TABLE sticker_details (
id BIGINT GENERATED always AS IDENTITY PRIMARY KEY,
sticker_structure_detail_id BIGINT NOT NULL,
design_element_type TEXT DEFAULT NULL,
element_id TEXT DEFAULT NULL,
element_type TEXT DEFAULT NULL,
string_value TEXT DEFAULT NULL,
string_font TEXT DEFAULT NULL,
string_size TEXT DEFAULT NULL,
element_colour TEXT DEFAULT NULL,
string_align TEXT DEFAULT NULL,
string_x_value TEXT DEFAULT NULL,
string_y_value TEXT DEFAULT NULL,
shape_name TEXT DEFAULT NULL,
shape_pen_size TEXT DEFAULT NULL,
shape_x1_value TEXT DEFAULT NULL,
shape_y1_value TEXT DEFAULT NULL,
shape_x2_value TEXT DEFAULT NULL,
shape_y2_value TEXT DEFAULT NULL,
image_path TEXT DEFAULT NULL,
image_type TEXT DEFAULT NULL,
image_x TEXT DEFAULT NULL,
image_y TEXT DEFAULT NULL,
image_width TEXT DEFAULT NULL,
image_height TEXT DEFAULT NULL,
qr_value TEXT DEFAULT NULL,
qr_align TEXT DEFAULT NULL,
qr_size TEXT DEFAULT NULL,
qr_x_value TEXT DEFAULT NULL,
qr_y_value TEXT DEFAULT NULL,
characteristics_type TEXT DEFAULT NULL,
curve_radius TEXT DEFAULT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
created_by TEXT DEFAULT NULL,
updated_by TEXT DEFAULT NULL,
deleted_at TIMESTAMP,
FOREIGN KEY (sticker_structure_detail_id) REFERENCES sticker_structure_details (id)
);
SQL;
DB::statement($sql);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sticker_details');
}
};