diff --git a/packages/supabase/migrations/14_post_tags.sql b/packages/supabase/migrations/14_post_tags.sql new file mode 100644 index 0000000..b3538d5 --- /dev/null +++ b/packages/supabase/migrations/14_post_tags.sql @@ -0,0 +1,2 @@ +ALTER TABLE IF EXISTS public.posts +ADD COLUMN tags text [] not null DEFAULT '{}'; \ No newline at end of file diff --git a/packages/supabase/types/index.ts b/packages/supabase/types/index.ts index 18edfe4..51f96e7 100644 --- a/packages/supabase/types/index.ts +++ b/packages/supabase/types/index.ts @@ -152,13 +152,6 @@ export type Database = { referencedRelation: "pages" referencedColumns: ["id"] }, - { - foreignKeyName: "page_settings_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } page_views: { @@ -236,15 +229,7 @@ export type Database = { url_slug?: string | null user_id?: string } - Relationships: [ - { - foreignKeyName: "pages_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] + Relationships: [] } post_reactions: { Row: { @@ -303,6 +288,7 @@ export type Database = { publication_date: string | null publish_at: string | null status: Database["public"]["Enums"]["post_status"] + tags: string[] title: string type: Database["public"]["Enums"]["post_type"] updated_at: string @@ -320,6 +306,7 @@ export type Database = { publication_date?: string | null publish_at?: string | null status: Database["public"]["Enums"]["post_status"] + tags?: string[] title: string type: Database["public"]["Enums"]["post_type"] updated_at?: string @@ -337,6 +324,7 @@ export type Database = { publication_date?: string | null publish_at?: string | null status?: Database["public"]["Enums"]["post_status"] + tags?: string[] title?: string type?: Database["public"]["Enums"]["post_type"] updated_at?: string @@ -350,13 +338,6 @@ export type Database = { referencedRelation: "pages" referencedColumns: ["id"] }, - { - foreignKeyName: "posts_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } users: { @@ -384,15 +365,7 @@ export type Database = { stripe_subscription?: Json | null stripe_subscription_id?: string | null } - Relationships: [ - { - foreignKeyName: "users_id_fkey" - columns: ["id"] - isOneToOne: true - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] + Relationships: [] } } Views: { @@ -548,3 +521,18 @@ export type Enums< : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] ? PublicSchema["Enums"][PublicEnumNameOrOptions] : never + +export type CompositeTypes< + PublicCompositeTypeNameOrOptions extends + | keyof PublicSchema["CompositeTypes"] + | { schema: keyof Database }, + CompositeTypeName extends PublicCompositeTypeNameOrOptions extends { + schema: keyof Database + } + ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] + : never = never, +> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database } + ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] + : PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"] + ? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] + : never