Hello!
I am looking at the database created by couch_cms and unless I am mistaken, there do not seem to be any foreign keys amongst the tables. Is this for a particular reason? I am hoping to add foreign keys to get some of my own queries to work properly.
For example - the couch_pages table has a template_id column. In the couch/install.php i do not see the creation of a foreign key:
Has anyone else tried manipulating the couch_cms tables? Has anything bad happened to you guys? I'm not an expert in mysql by any means so I can't imagine why a foreign key would affect any of the functionality.
I am looking at the database created by couch_cms and unless I am mistaken, there do not seem to be any foreign keys amongst the tables. Is this for a particular reason? I am hoping to add foreign keys to get some of my own queries to work properly.
For example - the couch_pages table has a template_id column. In the couch/install.php i do not see the creation of a foreign key:
- Code: Select all
$k_stmts[] = "CREATE TABLE ".K_TBL_PAGES." (
id int AUTO_INCREMENT NOT NULL,
template_id int NOT NULL,
parent_id int DEFAULT '0',
page_title varchar(255),
page_name varchar(255),
creation_date datetime DEFAULT '0000-00-00 00:00:00',
modification_date datetime DEFAULT '0000-00-00 00:00:00',
publish_date datetime DEFAULT '0000-00-00 00:00:00',
status int,
is_master int(1) DEFAULT '0',
page_folder_id int DEFAULT '-1',
access_level int DEFAULT '0',
comments_count int DEFAULT '0',
comments_open int(1) DEFAULT '1',
nested_parent_id int DEFAULT '-1',
weight int DEFAULT '0',
show_in_menu int(1) DEFAULT '1',
menu_text varchar(255),
is_pointer int(1) DEFAULT '0',
pointer_link text,
pointer_link_detail text,
open_external int(1) DEFAULT '0',
masquerades int(1) DEFAULT '0',
strict_matching int(1) DEFAULT '0',
file_name varchar(260),
file_ext varchar(20),
file_size int DEFAULT '0',
file_meta text,
creation_IP varchar(45),
k_order int DEFAULT '0',
PRIMARY KEY (id)
) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;";
Has anyone else tried manipulating the couch_cms tables? Has anything bad happened to you guys? I'm not an expert in mysql by any means so I can't imagine why a foreign key would affect any of the functionality.