forked from vlad-ghita/relations
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextension.driver.php
More file actions
27 lines (21 loc) · 939 Bytes
/
extension.driver.php
File metadata and controls
27 lines (21 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
Class Extension_Relations extends Extension {
/*------------------------------------------------------------------------------------------------*/
/* Installation */
/*------------------------------------------------------------------------------------------------*/
public function install() {
return Symphony::Database()->query("CREATE TABLE IF NOT EXISTS `tbl_fields_relation` (
`id` int(11) unsigned NOT NULL auto_increment,
`field_id` int(11) unsigned NOT NULL,
`limit` int(6) unsigned NOT NULL default '0',
`sections` VARCHAR(255) NOT NULL default '',
`view` VARCHAR(255) NOT NULL default '',
`view_info` TEXT NOT NULL default '',
PRIMARY KEY (`id`),
KEY `field_id` (`field_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;");
}
public function uninstall() {
return Symphony::Database()->query("DROP TABLE `tbl_fields_relation`");
}
}