Skip to content

Commit

Permalink
Update types (for debate_bill_match_view)
Browse files Browse the repository at this point in the history
  • Loading branch information
limdingwen committed Aug 6, 2024
1 parent 1f24721 commit 5f96a63
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 12 deletions.
94 changes: 88 additions & 6 deletions site/src/utils/supabase/database.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export type Database = {
second_reading_date: string | null
second_reading_date_type: string
summary: string | null
summary_backup: string | null
}
Insert: {
bill_no: string
Expand All @@ -38,7 +37,6 @@ export type Database = {
second_reading_date?: string | null
second_reading_date_type: string
summary?: string | null
summary_backup?: string | null
}
Update: {
bill_no?: string
Expand All @@ -53,7 +51,6 @@ export type Database = {
second_reading_date?: string | null
second_reading_date_type?: string
summary?: string | null
summary_backup?: string | null
}
Relationships: []
}
Expand All @@ -65,7 +62,6 @@ export type Database = {
order_no: number
sitting_id: number
summary: string | null
summary_backup: string | null
title: string
}
Insert: {
Expand All @@ -75,7 +71,6 @@ export type Database = {
order_no: number
sitting_id: number
summary?: string | null
summary_backup?: string | null
title: string
}
Update: {
Expand All @@ -85,7 +80,6 @@ export type Database = {
order_no?: number
sitting_id?: number
summary?: string | null
summary_backup?: string | null
title?: string
}
Relationships: [
Expand All @@ -96,6 +90,13 @@ export type Database = {
referencedRelation: "bill"
referencedColumns: ["id"]
},
{
foreignKeyName: "debate_bill_id_fkey"
columns: ["bill_id"]
isOneToOne: false
referencedRelation: "debate_bill_match_view"
referencedColumns: ["bill_id"]
},
{
foreignKeyName: "debate_sitting_id_fkey"
columns: ["sitting_id"]
Expand All @@ -110,6 +111,7 @@ export type Database = {
content: string
created_at: string
debate_id: number
fill_debate_speaker_ids_updated_at: string
id: number
order_no: number
speaker_id: number | null
Expand All @@ -119,6 +121,7 @@ export type Database = {
content: string
created_at?: string
debate_id: number
fill_debate_speaker_ids_updated_at?: string
id?: number
order_no: number
speaker_id?: number | null
Expand All @@ -128,6 +131,7 @@ export type Database = {
content?: string
created_at?: string
debate_id?: number
fill_debate_speaker_ids_updated_at?: string
id?: number
order_no?: number
speaker_id?: number | null
Expand All @@ -141,6 +145,13 @@ export type Database = {
referencedRelation: "debate"
referencedColumns: ["id"]
},
{
foreignKeyName: "debate_speech_debate_id_fkey"
columns: ["debate_id"]
isOneToOne: false
referencedRelation: "debate_bill_match_view"
referencedColumns: ["debate_id"]
},
{
foreignKeyName: "debate_speech_debate_id_fkey"
columns: ["debate_id"]
Expand Down Expand Up @@ -345,6 +356,24 @@ export type Database = {
}
}
Views: {
bill_full_text_view: {
Row: {
bill_no: string | null
full_text: string | null
name: string | null
}
Insert: {
bill_no?: string | null
full_text?: never
name?: string | null
}
Update: {
bill_no?: string | null
full_text?: never
name?: string | null
}
Relationships: []
}
combined_mp_names_view: {
Row: {
alias_name: string | null
Expand All @@ -353,6 +382,29 @@ export type Database = {
}
Relationships: []
}
debate_bill_match_view: {
Row: {
bill_id: number | null
debate_bill_id: number | null
debate_id: number | null
}
Relationships: [
{
foreignKeyName: "debate_bill_id_fkey"
columns: ["debate_bill_id"]
isOneToOne: false
referencedRelation: "bill"
referencedColumns: ["id"]
},
{
foreignKeyName: "debate_bill_id_fkey"
columns: ["debate_bill_id"]
isOneToOne: false
referencedRelation: "debate_bill_match_view"
referencedColumns: ["bill_id"]
},
]
}
debate_sortable_view: {
Row: {
id: number | null
Expand All @@ -363,6 +415,36 @@ export type Database = {
}
Relationships: []
}
debate_speech_full_text_view: {
Row: {
debate_id: number | null
full_text: string | null
title: string | null
}
Relationships: [
{
foreignKeyName: "debate_speech_debate_id_fkey"
columns: ["debate_id"]
isOneToOne: false
referencedRelation: "debate"
referencedColumns: ["id"]
},
{
foreignKeyName: "debate_speech_debate_id_fkey"
columns: ["debate_id"]
isOneToOne: false
referencedRelation: "debate_bill_match_view"
referencedColumns: ["debate_id"]
},
{
foreignKeyName: "debate_speech_debate_id_fkey"
columns: ["debate_id"]
isOneToOne: false
referencedRelation: "debate_sortable_view"
referencedColumns: ["id"]
},
]
}
unscraped_sitting_dates_view: {
Row: {
created_at: string | null
Expand Down
94 changes: 88 additions & 6 deletions supabase/functions/database.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export type Database = {
second_reading_date: string | null
second_reading_date_type: string
summary: string | null
summary_backup: string | null
}
Insert: {
bill_no: string
Expand All @@ -38,7 +37,6 @@ export type Database = {
second_reading_date?: string | null
second_reading_date_type: string
summary?: string | null
summary_backup?: string | null
}
Update: {
bill_no?: string
Expand All @@ -53,7 +51,6 @@ export type Database = {
second_reading_date?: string | null
second_reading_date_type?: string
summary?: string | null
summary_backup?: string | null
}
Relationships: []
}
Expand All @@ -65,7 +62,6 @@ export type Database = {
order_no: number
sitting_id: number
summary: string | null
summary_backup: string | null
title: string
}
Insert: {
Expand All @@ -75,7 +71,6 @@ export type Database = {
order_no: number
sitting_id: number
summary?: string | null
summary_backup?: string | null
title: string
}
Update: {
Expand All @@ -85,7 +80,6 @@ export type Database = {
order_no?: number
sitting_id?: number
summary?: string | null
summary_backup?: string | null
title?: string
}
Relationships: [
Expand All @@ -96,6 +90,13 @@ export type Database = {
referencedRelation: "bill"
referencedColumns: ["id"]
},
{
foreignKeyName: "debate_bill_id_fkey"
columns: ["bill_id"]
isOneToOne: false
referencedRelation: "debate_bill_match_view"
referencedColumns: ["bill_id"]
},
{
foreignKeyName: "debate_sitting_id_fkey"
columns: ["sitting_id"]
Expand All @@ -110,6 +111,7 @@ export type Database = {
content: string
created_at: string
debate_id: number
fill_debate_speaker_ids_updated_at: string
id: number
order_no: number
speaker_id: number | null
Expand All @@ -119,6 +121,7 @@ export type Database = {
content: string
created_at?: string
debate_id: number
fill_debate_speaker_ids_updated_at?: string
id?: number
order_no: number
speaker_id?: number | null
Expand All @@ -128,6 +131,7 @@ export type Database = {
content?: string
created_at?: string
debate_id?: number
fill_debate_speaker_ids_updated_at?: string
id?: number
order_no?: number
speaker_id?: number | null
Expand All @@ -141,6 +145,13 @@ export type Database = {
referencedRelation: "debate"
referencedColumns: ["id"]
},
{
foreignKeyName: "debate_speech_debate_id_fkey"
columns: ["debate_id"]
isOneToOne: false
referencedRelation: "debate_bill_match_view"
referencedColumns: ["debate_id"]
},
{
foreignKeyName: "debate_speech_debate_id_fkey"
columns: ["debate_id"]
Expand Down Expand Up @@ -345,6 +356,24 @@ export type Database = {
}
}
Views: {
bill_full_text_view: {
Row: {
bill_no: string | null
full_text: string | null
name: string | null
}
Insert: {
bill_no?: string | null
full_text?: never
name?: string | null
}
Update: {
bill_no?: string | null
full_text?: never
name?: string | null
}
Relationships: []
}
combined_mp_names_view: {
Row: {
alias_name: string | null
Expand All @@ -353,6 +382,29 @@ export type Database = {
}
Relationships: []
}
debate_bill_match_view: {
Row: {
bill_id: number | null
debate_bill_id: number | null
debate_id: number | null
}
Relationships: [
{
foreignKeyName: "debate_bill_id_fkey"
columns: ["debate_bill_id"]
isOneToOne: false
referencedRelation: "bill"
referencedColumns: ["id"]
},
{
foreignKeyName: "debate_bill_id_fkey"
columns: ["debate_bill_id"]
isOneToOne: false
referencedRelation: "debate_bill_match_view"
referencedColumns: ["bill_id"]
},
]
}
debate_sortable_view: {
Row: {
id: number | null
Expand All @@ -363,6 +415,36 @@ export type Database = {
}
Relationships: []
}
debate_speech_full_text_view: {
Row: {
debate_id: number | null
full_text: string | null
title: string | null
}
Relationships: [
{
foreignKeyName: "debate_speech_debate_id_fkey"
columns: ["debate_id"]
isOneToOne: false
referencedRelation: "debate"
referencedColumns: ["id"]
},
{
foreignKeyName: "debate_speech_debate_id_fkey"
columns: ["debate_id"]
isOneToOne: false
referencedRelation: "debate_bill_match_view"
referencedColumns: ["debate_id"]
},
{
foreignKeyName: "debate_speech_debate_id_fkey"
columns: ["debate_id"]
isOneToOne: false
referencedRelation: "debate_sortable_view"
referencedColumns: ["id"]
},
]
}
unscraped_sitting_dates_view: {
Row: {
created_at: string | null
Expand Down

0 comments on commit 5f96a63

Please sign in to comment.