Files
GMW/drizzle/migrations/0002_dark_omega_flight.sql
T
MythEclipse 3b9e87ee6c feat: add voice recordings feature with database integration
- Implemented PostgreSQL and SQLite schemas for voice recordings.
- Created repository functions for inserting, updating, and listing voice recordings.
- Developed uploader logic to handle file uploads and database updates.
- Added routes for accessing voice recordings via API.
- Enhanced UI state to include recordings tab.
- Introduced moderation WebSocket event for uploaded recordings.
2026-05-18 20:15:38 +07:00

20 lines
766 B
SQL

CREATE TABLE "voice_recordings" (
"id" text PRIMARY KEY NOT NULL,
"user_id" text NOT NULL,
"username" text NOT NULL,
"avatar_url" text,
"guild_id" text,
"channel_id" text,
"channel_name" text,
"filename" text NOT NULL,
"size_bytes" integer NOT NULL,
"download_url" text,
"upload_status" text DEFAULT 'pending' NOT NULL,
"upload_error" text,
"created_at" bigint NOT NULL,
"uploaded_at" bigint
);
--> statement-breakpoint
CREATE INDEX "idx_voice_recordings_user_id" ON "voice_recordings" USING btree ("user_id");--> statement-breakpoint
CREATE INDEX "idx_voice_recordings_channel_id" ON "voice_recordings" USING btree ("channel_id");--> statement-breakpoint
CREATE INDEX "idx_voice_recordings_created_at" ON "voice_recordings" USING btree ("created_at");