From da12516b591db168d5ef955ec943c64a7e138897 Mon Sep 17 00:00:00 2001 From: Igor Zalutski Date: Fri, 2 Aug 2024 18:34:46 +0100 Subject: [PATCH] Rename encrypted_env_vars table and its value column --- src/lib/database.types.ts | 318 +----------------- ...172204_rename_encrypted_env_vars_table.sql | 5 + 2 files changed, 9 insertions(+), 314 deletions(-) create mode 100644 supabase/migrations/20240802172204_rename_encrypted_env_vars_table.sql diff --git a/src/lib/database.types.ts b/src/lib/database.types.ts index 929211e7..4a92253a 100644 --- a/src/lib/database.types.ts +++ b/src/lib/database.types.ts @@ -513,30 +513,30 @@ export type Database = { }, ] } - encrypted_env_vars: { + env_vars: { Row: { - encrypted_value: string id: string is_secret: boolean name: string project_id: string updated_at: string + value: string } Insert: { - encrypted_value?: string id?: string is_secret?: boolean name: string project_id: string updated_at?: string + value?: string } Update: { - encrypted_value?: string id?: string is_secret?: boolean name?: string project_id?: string updated_at?: string + value?: string } Relationships: [ { @@ -1962,315 +1962,6 @@ export type Database = { [_ in never]: never } } - storage: { - Tables: { - buckets: { - Row: { - allowed_mime_types: string[] | null - avif_autodetection: boolean | null - created_at: string | null - file_size_limit: number | null - id: string - name: string - owner: string | null - owner_id: string | null - public: boolean | null - updated_at: string | null - } - Insert: { - allowed_mime_types?: string[] | null - avif_autodetection?: boolean | null - created_at?: string | null - file_size_limit?: number | null - id: string - name: string - owner?: string | null - owner_id?: string | null - public?: boolean | null - updated_at?: string | null - } - Update: { - allowed_mime_types?: string[] | null - avif_autodetection?: boolean | null - created_at?: string | null - file_size_limit?: number | null - id?: string - name?: string - owner?: string | null - owner_id?: string | null - public?: boolean | null - updated_at?: string | null - } - Relationships: [] - } - migrations: { - Row: { - executed_at: string | null - hash: string - id: number - name: string - } - Insert: { - executed_at?: string | null - hash: string - id: number - name: string - } - Update: { - executed_at?: string | null - hash?: string - id?: number - name?: string - } - Relationships: [] - } - objects: { - Row: { - bucket_id: string | null - created_at: string | null - id: string - last_accessed_at: string | null - metadata: Json | null - name: string | null - owner: string | null - owner_id: string | null - path_tokens: string[] | null - updated_at: string | null - version: string | null - } - Insert: { - bucket_id?: string | null - created_at?: string | null - id?: string - last_accessed_at?: string | null - metadata?: Json | null - name?: string | null - owner?: string | null - owner_id?: string | null - path_tokens?: string[] | null - updated_at?: string | null - version?: string | null - } - Update: { - bucket_id?: string | null - created_at?: string | null - id?: string - last_accessed_at?: string | null - metadata?: Json | null - name?: string | null - owner?: string | null - owner_id?: string | null - path_tokens?: string[] | null - updated_at?: string | null - version?: string | null - } - Relationships: [ - { - foreignKeyName: "objects_bucketId_fkey" - columns: ["bucket_id"] - isOneToOne: false - referencedRelation: "buckets" - referencedColumns: ["id"] - }, - ] - } - s3_multipart_uploads: { - Row: { - bucket_id: string - created_at: string - id: string - in_progress_size: number - key: string - owner_id: string | null - upload_signature: string - version: string - } - Insert: { - bucket_id: string - created_at?: string - id: string - in_progress_size?: number - key: string - owner_id?: string | null - upload_signature: string - version: string - } - Update: { - bucket_id?: string - created_at?: string - id?: string - in_progress_size?: number - key?: string - owner_id?: string | null - upload_signature?: string - version?: string - } - Relationships: [ - { - foreignKeyName: "s3_multipart_uploads_bucket_id_fkey" - columns: ["bucket_id"] - isOneToOne: false - referencedRelation: "buckets" - referencedColumns: ["id"] - }, - ] - } - s3_multipart_uploads_parts: { - Row: { - bucket_id: string - created_at: string - etag: string - id: string - key: string - owner_id: string | null - part_number: number - size: number - upload_id: string - version: string - } - Insert: { - bucket_id: string - created_at?: string - etag: string - id?: string - key: string - owner_id?: string | null - part_number: number - size?: number - upload_id: string - version: string - } - Update: { - bucket_id?: string - created_at?: string - etag?: string - id?: string - key?: string - owner_id?: string | null - part_number?: number - size?: number - upload_id?: string - version?: string - } - Relationships: [ - { - foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey" - columns: ["bucket_id"] - isOneToOne: false - referencedRelation: "buckets" - referencedColumns: ["id"] - }, - { - foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey" - columns: ["upload_id"] - isOneToOne: false - referencedRelation: "s3_multipart_uploads" - referencedColumns: ["id"] - }, - ] - } - } - Views: { - [_ in never]: never - } - Functions: { - can_insert_object: { - Args: { - bucketid: string - name: string - owner: string - metadata: Json - } - Returns: undefined - } - extension: { - Args: { - name: string - } - Returns: string - } - filename: { - Args: { - name: string - } - Returns: string - } - foldername: { - Args: { - name: string - } - Returns: string[] - } - get_size_by_bucket: { - Args: Record - Returns: { - size: number - bucket_id: string - }[] - } - list_multipart_uploads_with_delimiter: { - Args: { - bucket_id: string - prefix_param: string - delimiter_param: string - max_keys?: number - next_key_token?: string - next_upload_token?: string - } - Returns: { - key: string - id: string - created_at: string - }[] - } - list_objects_with_delimiter: { - Args: { - bucket_id: string - prefix_param: string - delimiter_param: string - max_keys?: number - start_after?: string - next_token?: string - } - Returns: { - name: string - id: string - metadata: Json - updated_at: string - }[] - } - operation: { - Args: Record - Returns: string - } - search: { - Args: { - prefix: string - bucketname: string - limits?: number - levels?: number - offsets?: number - search?: string - sortcolumn?: string - sortorder?: string - } - Returns: { - name: string - id: string - updated_at: string - created_at: string - last_accessed_at: string - metadata: Json - }[] - } - } - Enums: { - [_ in never]: never - } - CompositeTypes: { - [_ in never]: never - } - } } type PublicSchema = Database[Extract] @@ -2354,4 +2045,3 @@ export type Enums< : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] ? PublicSchema["Enums"][PublicEnumNameOrOptions] : never - diff --git a/supabase/migrations/20240802172204_rename_encrypted_env_vars_table.sql b/supabase/migrations/20240802172204_rename_encrypted_env_vars_table.sql new file mode 100644 index 00000000..0df51313 --- /dev/null +++ b/supabase/migrations/20240802172204_rename_encrypted_env_vars_table.sql @@ -0,0 +1,5 @@ +-- Rename the table +ALTER TABLE encrypted_env_vars RENAME TO env_vars; + +-- Rename the column +ALTER TABLE env_vars RENAME COLUMN encrypted_value TO value; \ No newline at end of file