-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
View/Edit support for CHECK constraints #16224
Comments
Merge this info with #13592 from 2017? |
at least changing a column, should not change/drop a given constraint! |
Hey! I came here to suggest exactly this.
--
|
Any updates on this? |
It is better to use table constraints: ALTER TABLE XX ADD CONSTRAINT `basicCheck` CHECK (`remoteID` > 0) But support in phymyadmin is still missing. |
Hi @nunoperalta |
if you do this per column, yes. And you can only the the column itself. |
You mean this, correct?
--
So it's better to do this, you mean:
-- Yeah, makes sense. I didn't know that was possible. Seems both MySQL and MariaDB support it: https://dev.mysql.com/doc/refman/8.0/en/alter-table.html Post 8.0.16:
https://mariadb.com/kb/en/constraint/
|
PLEASE let's just add the feature! Is there any reason we can't have BOTH column and table level definitions for CHECK? |
I don't see any reason why we couldn't have both. It also seems like you can use column and table constraints together as can be seen in the examples provided in MariaDB documentation: Is anybody willing to work on this? |
Is your feature request related to a problem? Please describe.
MariaDB (starting with 10.2.1) and MySQL (starting with 8.0.16) have CHECK constraints, an integrity feature that is part of the CREATE or ALTER table statement.
Describe the solution you'd like
I think this belongs on the table structure tab, probably between Index and Partition. We should show these constraints, which can be found with either an SQL query against
information_schema
or throughSHOW CREATE TABLE
...select constraint_schema as table_schema, table_name, constraint_name, check_clause as definition from information_schema.check_constraints order by table_schema, table_name
We can also allow people to create these constraints directly as part of the interface.
Describe alternatives you've considered
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: