Alters the table specified with the table_name and schema to the Table object specified in the body parameter.
In order to update an object, simply change the values of the Table objects in the request body. To delete, simply remove the object from the request body. To add, add the desired object to the request body.
The query is built in the following order:
DROP UNIQUE CONSTRAINT -> DROP PRIMARY KEY -> DROP FOREIGN KEY -> DROP COLUMN -> ADD COLUMN -> ALTER COLUMN -> RENAME COLUMN -> ADD UNIQUE CONSTRAINT -> ADD PRIMARY KEY -> ADD FOREIGN KEY -> RENAME TABLE -> SET SCHEMA
For the columns, it is important to note that the id is the unique key used to identify the column. If you remove the column_id key from the Column object, it will be dropped from the database and be recreated.
Since there is a given order for execution, if your alter requires to not follow the order above, make sure to separate the API calls.
A Table Pydantic object.
Enter: 'Bearer <JWT>', where JWT is the access token. Example: Bearer access_token_comes_here
Successful Response
The response is of type object
.
Alters the table specified with the table_name and schema to the Table object specified in the body parameter.
In order to update an object, simply change the values of the Table objects in the request body. To delete, simply remove the object from the request body. To add, add the desired object to the request body.
The query is built in the following order:
DROP UNIQUE CONSTRAINT -> DROP PRIMARY KEY -> DROP FOREIGN KEY -> DROP COLUMN -> ADD COLUMN -> ALTER COLUMN -> RENAME COLUMN -> ADD UNIQUE CONSTRAINT -> ADD PRIMARY KEY -> ADD FOREIGN KEY -> RENAME TABLE -> SET SCHEMA
For the columns, it is important to note that the id is the unique key used to identify the column. If you remove the column_id key from the Column object, it will be dropped from the database and be recreated.
Since there is a given order for execution, if your alter requires to not follow the order above, make sure to separate the API calls.
A Table Pydantic object.
Enter: 'Bearer <JWT>', where JWT is the access token. Example: Bearer access_token_comes_here
Successful Response
The response is of type object
.