-- v0.942: Mark existing database as consolidated (no schema change)
-- Run this ONCE MANUALLY on databases that already have all migrations applied (v0→v0.803).
-- Do NOT add to migrations/ — it would corrupt new DBs.
-- Usage: psql $DATABASE_URL -f scripts/mark_consolidated.sql
-- See docs/MIGRATION_CONSOLIDATION.md

INSERT INTO schema_migrations (version) VALUES
('001_extensions_and_types.sql'),
('010_auth_and_users.sql'),
('011_cleanup_refresh_tokens.sql'),
('012_add_user_social_links.sql'),
('020_create_sessions.sql'),
('020_z_migration_rename_records.sql'),
('021_rbac_and_profiles.sql'),
('030_files_management.sql'),
('040_streaming_core.sql'),
('041_streaming_analytics.sql'),
('042_media_processing.sql'),
('043_analytics_events.sql'),
('044_playlist_share_links.sql'),
('045_user_follows.sql'),
('046_user_blocks.sql'),
('047_notifications.sql'),
('048_search_indexes.sql'),
('049_composite_indexes.sql'),
('050_data_validation_constraints.sql'),
('051_legacy_chat.sql'),
('052_stats_views.sql'),
('053_audit_triggers.sql'),
('060_job_queue.sql'),
('069_groups_and_members.sql'),
('070_create_social_tables.sql'),
('075_create_webhooks.sql'),
('076_create_gear_items.sql'),
('077_create_live_streams.sql'),
('078_add_missing_indexes.sql'),
('080_add_payment_fields.sql'),
('081_create_playback_analytics.sql'),
('082_create_api_keys.sql'),
('083_add_user_banner.sql'),
('084_add_track_lyrics.sql'),
('085_add_track_tags.sql'),
('086_add_pg_trgm.sql'),
('087_queue_sessions.sql'),
('088_user_presence.sql'),
('089_group_join_requests.sql'),
('090_push_subscriptions.sql'),
('091_user_presence_invisible.sql'),
('092_group_invitations.sql'),
('093_notification_preferences.sql'),
('094_user_presence_rich.sql'),
('095_products_enrichment.sql'),
('096_product_previews.sql'),
('097_product_images.sql'),
('098_product_licenses.sql'),
('099_promo_codes.sql'),
('100_orders_discount.sql'),
('101_product_reviews.sql'),
('102_license_revoked.sql'),
('103_tracks_waveform.sql'),
('104_user_folders.sql'),
('105_user_files.sql'),
('106_user_storage_quotas.sql'),
('107_gear_is_public.sql'),
('108_gear_images.sql'),
('109_read_receipts.sql'),
('110_delivered_status.sql'),
('111_message_reactions.sql'),
('112_messages_extra_columns.sql'),
('113_messages_fts.sql'),
('114_seller_stripe_accounts.sql'),
('115_seller_transfers.sql'),
('116_seller_transfers_retry.sql'),
('117_live_streams_go_live.sql'),
('118_user_preferences.sql'),
('119_cloud_file_versions.sql'),
('120_gear_warranty.sql'),
('121_gear_documents.sql'),
('122_gear_repairs.sql'),
('900_triggers_and_functions.sql'),
('910_create_audit_logs.sql'),
('920_add_performance_indexes.sql'),
('930_add_missing_foreign_keys.sql'),
('931_add_refresh_tokens_updated_at.sql'),
('932_add_user_deletion_fields.sql'),
('933_reports.sql'),
('934_announcements.sql'),
('935_feature_flags.sql'),
('936_oauth_states_pkce.sql')
ON CONFLICT (version) DO NOTHING;
