mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
Add sample on how to add multiple column foreign keys to the same table
This commit is contained in:
1 parent
d203b90c3a
commit
02edecc7bb
1 file changed
+7
@@ -111,6 +111,13 @@ pages:
|
||||
primary key (column_1, column_2)
|
||||
);
|
||||
```
|
||||
- name: Multiple foreign keys to the same table
|
||||
sql: |
|
||||
```sql
|
||||
alter table table_name
|
||||
add constraint constraint_name_1 foreign key (colum_1) references foreign_table(id),
|
||||
add constraint constraint_name_2 foreign key (colum_2) references foreign_table(id);
|
||||
```
|
||||
- name: Delete a table
|
||||
sql: |
|
||||
```sql
|
||||
|
||||
Reference in new issue
Block a user