Skip to content

Commit 246f8b0

Browse files
committed
fix(api): correct source_type column to TEXT in sources schema
The database seeding was failing with a JSON syntax error because the `sources` table defined the `source_type` column as `JSONB`, but the `Source` model provides this value as a simple string (from an enum). This change corrects the `source_type` column type to `TEXT`, aligning the database schema with the data model and resolving the final seeding error.
1 parent 7369603 commit 246f8b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/services/database_seeding_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class DatabaseSeedingService {
7979
language TEXT,
8080
status TEXT,
8181
type TEXT,
82-
source_type JSONB,
82+
source_type TEXT,
8383
headquarters_country_id TEXT REFERENCES countries(id),
8484
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
8585
updated_at TIMESTAMPTZ

0 commit comments

Comments
 (0)