Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post tags #41

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/supabase/migrations/14_post_tags.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE IF EXISTS public.posts
ADD COLUMN tags text [] not null DEFAULT '{}';
52 changes: 20 additions & 32 deletions packages/supabase/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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
Loading