diff --git a/src/admin/sql/mysql/install.sql b/src/admin/sql/mysql/install.sql
index c58928a..076c280 100644
--- a/src/admin/sql/mysql/install.sql
+++ b/src/admin/sql/mysql/install.sql
@@ -1,7 +1,6 @@
-DROP TABLE IF EXISTS `#__club_clubs`;
-CREATE TABLE `#__club_clubs` (
- `id` int(10) NOT NULL AUTO_INCREMENT,
+CREATE TABLE IF NOT EXISTS `#__club_clubs` (
+ `id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` varchar(100) NOT NULL,
`address` tinytext NOT NULL,
`city` varchar(50) NOT NULL,
@@ -10,49 +9,39 @@ CREATE TABLE `#__club_clubs` (
`iban` char(34) NOT NULL,
`bic` char(11) NOT NULL,
`charitable` tinyint(1) NOT NULL,
- `president` int(10) NOT NULL,
- PRIMARY KEY (`id`)
+ `president` int(10) NOT NULL
);
-DROP TABLE IF EXISTS `#__club_keys`;
-CREATE TABLE `#__club_keys` (
+CREATE TABLE IF NOT EXISTS `#__club_keys` (
`privkey` text NOT NULL,
`publickey` text NOT NULL
);
-DROP TABLE IF EXISTS `#__club_offer_assocs`;
-CREATE TABLE `#__club_offer_assocs` (
- `id` int(10) NOT NULL AUTO_INCREMENT,
+CREATE TABLE IF NOT EXISTS `#__club_offer_assocs` (
+ `id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`clubid` int(10) NOT NULL,
- `offerid` int(10) NOT NULL,
- PRIMARY KEY (`id`)
+ `offerid` int(10) NOT NULL
);
-DROP TABLE IF EXISTS `#__club_offers`;
-CREATE TABLE `#__club_offers` (
- `id` int(10) NOT NULL AUTO_INCREMENT,
- `name` varchar(100) NOT NULL,
- PRIMARY KEY (`id`)
+CREATE TABLE IF NOT EXISTS `#__club_offers` (
+ `id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `name` varchar(100) NOT NULL
);
-DROP TABLE IF EXISTS `#__club_places`;
-CREATE TABLE `#__club_places` (
- `id` int(10) NOT NULL AUTO_INCREMENT,
+CREATE TABLE IF NOT EXISTS `#__club_places` (
+ `id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`clubid` int(10) NOT NULL,
`name` varchar(100) NOT NULL,
`address` tinytext NOT NULL,
- `area` int(10) DEFAULT NULL,
- PRIMARY KEY (`id`)
+ `area` int(10) DEFAULT NULL
);
-DROP TABLE IF EXISTS `#__club_positions`;
-CREATE TABLE `#__club_positions` (
- `id` int(10) NOT NULL AUTO_INCREMENT,
- `name` varchar(100) NOT NULL,
- PRIMARY KEY (`id`)
+CREATE TABLE IF NOT EXISTS `#__club_positions` (
+ `id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `name` varchar(100) NOT NULL
+);
-DROP TABLE IF EXISTS `#__club_user_assocs`;
-CREATE TABLE `#__club_user_assocs` (
+CREATE TABLE IF NOT EXISTS `#__club_user_assocs` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`clubid` int(10) NOT NULL,
`userid` int(10) DEFAULT NULL,
@@ -65,8 +54,7 @@ CREATE TABLE `#__club_user_assocs` (
PRIMARY KEY (`id`)
);
-DROP TABLE IF EXISTS `#__club_users`;
-CREATE TABLE `#__club_users` (
+CREATE TABLE IF NOT EXISTS `#__club_users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`user` varchar(30) NOT NULL,
`password` varchar(150) DEFAULT NULL,
diff --git a/src/clubs.xml b/src/clubs.xml
index 84217ba..fb153e5 100644
--- a/src/clubs.xml
+++ b/src/clubs.xml
@@ -5,8 +5,9 @@
type="component">
-