Original Post
I have a table containing text strings for a website. It's a pretty simple table: This works beautifully for SELECT and UPDATE, but INSERT doesn't work at all - thanks to the WITH CHECK OPTION clause I get the CHECK OPTION failed 'content' error as
+----------+---------+
| id | content |
+----------+---------+
| greeting | Hello |
+----------+---------+Now, I'd like to extend the table to support other languages: +----------+----------+---------+
| id | language | content |
+----------+----------+---------+
| greeting | en | Hello |
| greeting | fr | Salut |
+----------+----------+---------+To reduce the number of code changes that this would require, I've renamed the table and created a view: CREATE OR REPLACE
VIEW `content`
AS
SELECT
`content_translated`.`id` AS `id`,
`content_translated`.`content` AS `content`
FROM
`content_translated`
WHERE `language`='en'
WITH CHECK OPTION;
language is not getting set. Is there a way to set a default value for language (other than on the underlying content_translated table)? Or is this a harebrained scheme from the start?