summaryrefslogblamecommitdiffstats
path: root/modules-available/passthrough/install.inc.php
blob: 01d3edbb35e256fad7bbf1ecd0340ca28a13cecd (plain) (tree)
1
2
3
4
5
6
7
8







                                                         













                                                                            
                          
<?php

$result[] = tableCreate('passthrough_group', "
  `groupid` varchar(32) CHARACTER SET ascii DEFAULT NULL,
  `title` varchar(200) NOT NULL,
  PRIMARY KEY (`groupid`)
");

$result[] = tableCreate('passthrough_group_x_location', "
  `groupid` varchar(32) CHARACTER SET ascii DEFAULT NULL,
  `locationid` INT(11) NOT NULL,
  PRIMARY KEY (`groupid`, `locationid`)
");

$result[] = tableAddConstraint('passthrough_group_x_location', 'groupid',
	'passthrough_group', 'groupid',
	'ON DELETE CASCADE ON UPDATE CASCADE');

$result[] = tableAddConstraint('passthrough_group_x_location', 'locationid',
	'location', 'locationid',
	'ON DELETE CASCADE ON UPDATE CASCADE');

responseFromArray($result);