 # Table structure for table `permissions`
 #
 
-CREATE TABLE {$db_prefix}permissions (
-  id_group smallint(5) NOT NULL default '0',
-  permission varchar(30) NOT NULL default '',
-  add_deny tinyint(4) NOT NULL default '1',
-  PRIMARY KEY (id_group, permission)
-) ENGINE=MyISAM;
+$db_table->db_create_table('{db_prefix}permissions',
+	array(
+		array('name' => 'id_group',   'type' => 'smallint', 'size' => 5, 'default' => 0),
+		array('name' => 'permission', 'type' => 'varchar', 'size' => 30, 'default' => ''),
+		array('name' => 'add_deny',   'type' => 'tinyint', 'size' => 4, 'default' => 1),
+	),
+	array(
+		array('name' => 'group_permission', 'columns' => array('id_group', 'permission'), 'type' => 'primary'),
+	)
+);
 
 #
 # Dumping data for table `permissions`

# Table structure for table `moderators`
#

CREATE TABLE {$db_prefix}moderators (
  id_board smallint(5) unsigned NOT NULL default '0',
  id_member mediumint(8) unsigned NOT NULL default '0',
  PRIMARY KEY (id_board, id_member)
) ENGINE=MyISAM;

#
# Table structure for table `openid_assoc`
#

CREATE TABLE {$db_prefix}openid_assoc (
  server_url text NOT NULL,
  handle varchar(255) NOT NULL default '',
  secret text NOT NULL,
  issued int(10) NOT NULL default '0',
  expires int(10) NOT NULL default '0',
  assoc_type varchar(64) NOT NULL default '',
  PRIMARY KEY (server_url(125), handle(125)),
  KEY expires (expires)
) ENGINE=MyISAM;

#
# Table structure for table `package_servers`
#

CREATE TABLE {$db_prefix}package_servers (
  id_server smallint(5) unsigned NOT NULL auto_increment,
  name varchar(255) NOT NULL default '',
  url varchar(255) NOT NULL default '',
  PRIMARY KEY (id_server)
) ENGINE=MyISAM;

#
# Dumping data for table `package_servers`

# Table structure for table `settings`
#

$db_table->db_create_table('{db_prefix}settings',
	array(
		array('name' => 'variable', 'type' => 'varchar', 'size' => 255, 'default' => ''),
		array('name' => 'value',    'type' => 'text'),
	),
	array(
		array('name' => 'variable', 'columns' => array('variable(30)'), 'type' => 'primary'),
	)
);

#
# Dumping data for table `settings`
