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

fix(ci): supabase prod pipelines #4188

Merged
merged 5 commits into from
Dec 17, 2024
Merged
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
1 change: 0 additions & 1 deletion .github/workflows/on_merge_to_main_supabase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

jobs:
deploy:
if: ${{ false }}
runs-on: ubuntu-latest

env:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/update_docs_embed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ jobs:
if: steps.yarn_cache_id.outputs.cache-hit != 'true' || steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: yarn install --immutable

# - name: Link Supabase project
# run: yarn workspace @twilio-paste/backend supabase link --project-ref $PROJECT_ID
- uses: supabase/setup-cli@v1
with:
version: latest

- name: Link Supabase project
run: yarn workspace @twilio-paste/backend supabase link --project-ref $PROJECT_ID

# - name: Run migrations
# run: yarn workspace @twilio-paste/backend supabase db push
- name: Run migrations
run: yarn workspace @twilio-paste/backend supabase db push

- name: Update embeddings
if: ${{ !inputs.refresh }}
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"db:reset": "yarn supabase db reset"
},
"devDependencies": {
"supabase": "1.136.3"
"supabase": "^1.204.3"
}
}
95 changes: 56 additions & 39 deletions apps/backend/supabase/schema.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type Json =
| { [key: string]: Json | undefined }
| Json[]

export interface Database {
export type Database = {
graphql_public: {
Tables: {
[_ in never]: never
Expand Down Expand Up @@ -96,7 +96,7 @@ export interface Database {
isOneToOne: false
referencedRelation: "page"
referencedColumns: ["id"]
}
},
]
}
page_section: {
Expand Down Expand Up @@ -134,7 +134,7 @@ export interface Database {
isOneToOne: false
referencedRelation: "page"
referencedColumns: ["id"]
}
},
]
}
queries: {
Expand Down Expand Up @@ -217,7 +217,7 @@ export interface Database {
isOneToOne: false
referencedRelation: "story"
referencedColumns: ["id"]
}
},
]
}
}
Expand Down Expand Up @@ -488,7 +488,7 @@ export interface Database {
isOneToOne: false
referencedRelation: "buckets"
referencedColumns: ["id"]
}
},
]
}
s3_multipart_uploads: {
Expand Down Expand Up @@ -532,7 +532,7 @@ export interface Database {
isOneToOne: false
referencedRelation: "buckets"
referencedColumns: ["id"]
}
},
]
}
s3_multipart_uploads_parts: {
Expand Down Expand Up @@ -586,7 +586,7 @@ export interface Database {
isOneToOne: false
referencedRelation: "s3_multipart_uploads"
referencedColumns: ["id"]
}
},
]
}
}
Expand Down Expand Up @@ -619,7 +619,7 @@ export interface Database {
Args: {
name: string
}
Returns: unknown
Returns: string[]
}
get_size_by_bucket: {
Args: Record<PropertyKey, never>
Expand Down Expand Up @@ -693,83 +693,100 @@ export interface Database {
}
}

type PublicSchema = Database[Extract<keyof Database, "public">]

export type Tables<
PublicTableNameOrOptions extends
| keyof (Database["public"]["Tables"] & Database["public"]["Views"])
| keyof (PublicSchema["Tables"] & PublicSchema["Views"])
| { schema: keyof Database },
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
Database[PublicTableNameOrOptions["schema"]]["Views"])
: never = never
: never = never,
> = PublicTableNameOrOptions extends { schema: keyof Database }
? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
Row: infer R
}
? R
: never
: PublicTableNameOrOptions extends keyof (Database["public"]["Tables"] &
Database["public"]["Views"])
? (Database["public"]["Tables"] &
Database["public"]["Views"])[PublicTableNameOrOptions] extends {
Row: infer R
}
? R
: PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
PublicSchema["Views"])
? (PublicSchema["Tables"] &
PublicSchema["Views"])[PublicTableNameOrOptions] extends {
Row: infer R
}
? R
: never
: never
: never

export type TablesInsert<
PublicTableNameOrOptions extends
| keyof Database["public"]["Tables"]
| keyof PublicSchema["Tables"]
| { schema: keyof Database },
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
: never = never
: never = never,
> = PublicTableNameOrOptions extends { schema: keyof Database }
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
Insert: infer I
}
? I
: never
: PublicTableNameOrOptions extends keyof Database["public"]["Tables"]
? Database["public"]["Tables"][PublicTableNameOrOptions] extends {
Insert: infer I
}
? I
: PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
Insert: infer I
}
? I
: never
: never
: never

export type TablesUpdate<
PublicTableNameOrOptions extends
| keyof Database["public"]["Tables"]
| keyof PublicSchema["Tables"]
| { schema: keyof Database },
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
: never = never
: never = never,
> = PublicTableNameOrOptions extends { schema: keyof Database }
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
Update: infer U
}
? U
: never
: PublicTableNameOrOptions extends keyof Database["public"]["Tables"]
? Database["public"]["Tables"][PublicTableNameOrOptions] extends {
Update: infer U
}
? U
: PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
Update: infer U
}
? U
: never
: never
: never

export type Enums<
PublicEnumNameOrOptions extends
| keyof Database["public"]["Enums"]
| keyof PublicSchema["Enums"]
| { schema: keyof Database },
EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
: never = never
: never = never,
> = PublicEnumNameOrOptions extends { schema: keyof Database }
? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
: PublicEnumNameOrOptions extends keyof Database["public"]["Enums"]
? Database["public"]["Enums"][PublicEnumNameOrOptions]
: never
: 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
Loading