mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
feat: introduce audio administration, reel generation, and enhanced analytics with new database schema and API routes.
This commit is contained in:
1 parent
b31a45549a
commit
04373d2881
3 files changed
+72
-39
No files matched your search
@@ -117,6 +117,19 @@ export async function migrate() {
|
||||
ADD COLUMN IF NOT EXISTS "page_engagement" integer DEFAULT 0;
|
||||
`);
|
||||
|
||||
// audio_tracks (bibliothèque audio interne)
|
||||
await client.query(`
|
||||
CREATE TABLE IF NOT EXISTS "audio_tracks" (
|
||||
"id" varchar PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"user_id" varchar REFERENCES "users"("id") ON DELETE cascade,
|
||||
"title" text NOT NULL,
|
||||
"file_name" text NOT NULL,
|
||||
"url" text NOT NULL,
|
||||
"duration" integer DEFAULT 0,
|
||||
"created_at" timestamp DEFAULT now()
|
||||
);
|
||||
`);
|
||||
|
||||
console.log("[Migration] Safe migration completed.");
|
||||
} catch (error) {
|
||||
console.error("[Migration] Error during migration:", error);
|
||||
|
||||
Reference in new issue
Block a user