diff --git a/skeema/gradido_community/admin_errors.sql b/skeema/gradido_community/admin_errors.sql index ea4dda916..877b1d7db 100644 --- a/skeema/gradido_community/admin_errors.sql +++ b/skeema/gradido_community/admin_errors.sql @@ -1,5 +1,5 @@ CREATE TABLE `admin_errors` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, `state_user_id` int(11) NOT NULL, `controller` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, diff --git a/skeema/gradido_community/operator_types.sql b/skeema/gradido_community/operator_types.sql index 8fad5073b..ccf779b0b 100644 --- a/skeema/gradido_community/operator_types.sql +++ b/skeema/gradido_community/operator_types.sql @@ -1,6 +1,6 @@ CREATE TABLE `operator_types` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(25) COLLATE utf8_bin NOT NULL, - `text` varchar(255) COLLATE utf8_bin NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `text` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/operators.sql b/skeema/gradido_community/operators.sql index b5a57b559..e995ff25e 100644 --- a/skeema/gradido_community/operators.sql +++ b/skeema/gradido_community/operators.sql @@ -1,8 +1,8 @@ CREATE TABLE `operators` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `username` varchar(50) COLLATE utf8_bin NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `username` varchar(50) NOT NULL, `user_pubkey` binary(32) NOT NULL, - `data_base64` varchar(255) COLLATE utf8_bin NOT NULL, + `data_base64` varchar(255) NOT NULL, `modified` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/pending_transactions.sql b/skeema/gradido_community/pending_transactions.sql index 25f865671..b3f94f38f 100644 --- a/skeema/gradido_community/pending_transactions.sql +++ b/skeema/gradido_community/pending_transactions.sql @@ -1,10 +1,10 @@ CREATE TABLE `pending_transactions` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `transactionID` varchar(25) COLLATE utf8_bin NOT NULL, - `service` varchar(20) COLLATE utf8_bin NOT NULL, - `method` varchar(20) COLLATE utf8_bin NOT NULL, - `h_server_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `transactionID` varchar(25) NOT NULL, + `service` varchar(20) NOT NULL, + `method` varchar(20) NOT NULL, + `h_server_id` int NOT NULL, `timeout` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`id`), UNIQUE KEY `transactionID` (`transactionID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/server_users.sql b/skeema/gradido_community/server_users.sql index 68546d9d1..801eacef0 100644 --- a/skeema/gradido_community/server_users.sql +++ b/skeema/gradido_community/server_users.sql @@ -1,12 +1,12 @@ CREATE TABLE `server_users` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `username` varchar(50) COLLATE utf8_bin NOT NULL, - `password` varchar(255) COLLATE utf8_bin NOT NULL, - `email` varchar(50) COLLATE utf8_bin NOT NULL, - `role` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'admin', - `activated` tinyint(1) NOT NULL DEFAULT 0, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `username` varchar(50) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(50) NOT NULL, + `role` varchar(20) NOT NULL DEFAULT 'admin', + `activated` tinyint NOT NULL DEFAULT 0, `last_login` datetime DEFAULT NULL, `created` datetime NOT NULL, `modified` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/state_balances.sql b/skeema/gradido_community/state_balances.sql index a4fa8b20c..9afb308ac 100644 --- a/skeema/gradido_community/state_balances.sql +++ b/skeema/gradido_community/state_balances.sql @@ -1,7 +1,7 @@ CREATE TABLE `state_balances` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `state_user_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `state_user_id` int UNSIGNED NOT NULL, `modified` datetime NOT NULL, - `amount` bigint(20) NOT NULL, + `amount` bigint NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/state_created.sql b/skeema/gradido_community/state_created.sql index d03b51a5f..05a2a8c97 100644 --- a/skeema/gradido_community/state_created.sql +++ b/skeema/gradido_community/state_created.sql @@ -1,11 +1,11 @@ CREATE TABLE `state_created` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `transaction_id` int(11) NOT NULL, - `month` tinyint(4) NOT NULL, - `year` smallint(6) NOT NULL, - `state_user_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `transaction_id` int UNSIGNED NOT NULL, + `month` tinyint UNSIGNED NOT NULL, + `year` smallint UNSIGNED NOT NULL, + `state_user_id` int UNSIGNED NOT NULL, `created` datetime NOT NULL, - `short_ident_hash` int(11) NOT NULL, + `short_ident_hash` int UNSIGNED NOT NULL, PRIMARY KEY (`id`), KEY `short_ident_hash` (`short_ident_hash`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/state_errors.sql b/skeema/gradido_community/state_errors.sql index db56b6290..141e97562 100644 --- a/skeema/gradido_community/state_errors.sql +++ b/skeema/gradido_community/state_errors.sql @@ -1,8 +1,8 @@ CREATE TABLE `state_errors` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `state_user_id` int(11) NOT NULL, - `transaction_type_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `state_user_id` int UNSIGNED NOT NULL, + `transaction_type_id` int UNSIGNED NOT NULL, `created` datetime NOT NULL, `message_json` text NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/state_group_addresses.sql b/skeema/gradido_community/state_group_addresses.sql index 9d73a2ab5..38e8c36a8 100644 --- a/skeema/gradido_community/state_group_addresses.sql +++ b/skeema/gradido_community/state_group_addresses.sql @@ -1,7 +1,7 @@ CREATE TABLE `state_group_addresses` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `group_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `group_id` int UNSIGNED NOT NULL, `public_key` binary(32) NOT NULL, - `address_type_id` int(11) NOT NULL, + `address_type_id` int UNSIGNED NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/state_group_relationships.sql b/skeema/gradido_community/state_group_relationships.sql index 2ce89d33d..19f7f5752 100644 --- a/skeema/gradido_community/state_group_relationships.sql +++ b/skeema/gradido_community/state_group_relationships.sql @@ -1,7 +1,7 @@ CREATE TABLE `state_group_relationships` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `group1_id` int(11) NOT NULL, - `group2_id` int(11) NOT NULL, - `state_relationship_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `group1_id` int UNSIGNED NOT NULL, + `group2_id` int UNSIGNED NOT NULL, + `state_relationship_id` int UNSIGNED NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/state_groups.sql b/skeema/gradido_community/state_groups.sql index 27a895d71..1ac95ec6c 100644 --- a/skeema/gradido_community/state_groups.sql +++ b/skeema/gradido_community/state_groups.sql @@ -1,8 +1,8 @@ CREATE TABLE `state_groups` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, `index_id` varbinary(64) NOT NULL, - `name` varchar(50) COLLATE utf8_bin NOT NULL, + `name` varchar(50) NOT NULL, `root_public_key` binary(32) NOT NULL, - `user_count` smallint(6) NOT NULL DEFAULT 0, + `user_count` smallint UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/state_relationship_types.sql b/skeema/gradido_community/state_relationship_types.sql index 5269b9e6e..99c428afd 100644 --- a/skeema/gradido_community/state_relationship_types.sql +++ b/skeema/gradido_community/state_relationship_types.sql @@ -1,6 +1,6 @@ CREATE TABLE `state_relationship_types` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(25) COLLATE utf8_bin NOT NULL, - `text` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `text` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/state_users.sql b/skeema/gradido_community/state_users.sql index fb6b4263c..4f31a7e3c 100644 --- a/skeema/gradido_community/state_users.sql +++ b/skeema/gradido_community/state_users.sql @@ -1,12 +1,12 @@ CREATE TABLE `state_users` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `index_id` smallint(6) NOT NULL DEFAULT 0, - `group_id` int(11) NOT NULL DEFAULT 0, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `index_id` smallint NOT NULL DEFAULT 0, + `group_id` int UNSIGNED NOT NULL DEFAULT 0, `public_key` binary(32) NOT NULL, - `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `first_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `last_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `first_name` varchar(255) DEFAULT NULL, + `last_name` varchar(255) DEFAULT NULL, + `username` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `public_key` (`public_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/transaction_creations.sql b/skeema/gradido_community/transaction_creations.sql index dffe220e9..0fcb92582 100644 --- a/skeema/gradido_community/transaction_creations.sql +++ b/skeema/gradido_community/transaction_creations.sql @@ -1,9 +1,9 @@ CREATE TABLE `transaction_creations` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `transaction_id` int(11) NOT NULL, - `state_user_id` int(11) NOT NULL, - `amount` bigint(20) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `transaction_id` int UNSIGNED NOT NULL, + `state_user_id` int UNSIGNED NOT NULL, + `amount` bigint NOT NULL, `ident_hash` binary(32) NOT NULL, `target_date` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/transaction_group_addaddress.sql b/skeema/gradido_community/transaction_group_addaddress.sql index 59db29dcb..1c6fe826c 100644 --- a/skeema/gradido_community/transaction_group_addaddress.sql +++ b/skeema/gradido_community/transaction_group_addaddress.sql @@ -1,7 +1,7 @@ CREATE TABLE `transaction_group_addaddress` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `transaction_id` int(11) NOT NULL, - `address_type_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `transaction_id` int UNSIGNED NOT NULL, + `address_type_id` int UNSIGNED NOT NULL, `public_key` binary(32) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/transaction_group_allowtrades.sql b/skeema/gradido_community/transaction_group_allowtrades.sql index 689694c13..e2c299b34 100644 --- a/skeema/gradido_community/transaction_group_allowtrades.sql +++ b/skeema/gradido_community/transaction_group_allowtrades.sql @@ -1,7 +1,7 @@ CREATE TABLE `transaction_group_allowtrades` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `transaction_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `transaction_id` int UNSIGNED NOT NULL, `remote_group_id` varbinary(64) NOT NULL, - `allow` tinyint(1) NOT NULL DEFAULT 0, + `allow` tinyint NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/transaction_group_creates.sql b/skeema/gradido_community/transaction_group_creates.sql index 2a383e300..afb8caf88 100644 --- a/skeema/gradido_community/transaction_group_creates.sql +++ b/skeema/gradido_community/transaction_group_creates.sql @@ -1,8 +1,8 @@ CREATE TABLE `transaction_group_creates` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `transaction_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `transaction_id` int UNSIGNED NOT NULL, `group_public_key` binary(32) NOT NULL, - `group_id` varchar(64) COLLATE utf8_bin NOT NULL, - `name` varchar(64) COLLATE utf8_bin NOT NULL, + `group_id` varchar(64) NOT NULL, + `name` varchar(64) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/transaction_send_coins.sql b/skeema/gradido_community/transaction_send_coins.sql index a44b344e8..d55d57b51 100644 --- a/skeema/gradido_community/transaction_send_coins.sql +++ b/skeema/gradido_community/transaction_send_coins.sql @@ -1,10 +1,10 @@ CREATE TABLE `transaction_send_coins` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `transaction_id` int(11) NOT NULL, - `state_user_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `transaction_id` int UNSIGNED NOT NULL, + `state_user_id` int UNSIGNED NOT NULL, `receiver_public_key` binary(32) NOT NULL, - `receiver_user_id` int(11) NOT NULL, - `amount` bigint(20) NOT NULL, - `sender_final_balance` bigint(20) NOT NULL, + `receiver_user_id` int UNSIGNED NOT NULL, + `amount` bigint NOT NULL, + `sender_final_balance` bigint NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/transaction_signatures.sql b/skeema/gradido_community/transaction_signatures.sql index 09f3d196d..2e8507c23 100644 --- a/skeema/gradido_community/transaction_signatures.sql +++ b/skeema/gradido_community/transaction_signatures.sql @@ -1,7 +1,7 @@ CREATE TABLE `transaction_signatures` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `transaction_id` int(11) NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `transaction_id` int UNSIGNED NOT NULL, `signature` binary(64) NOT NULL, `pubkey` binary(32) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/transaction_types.sql b/skeema/gradido_community/transaction_types.sql index 7f916adbc..4d1c13b55 100644 --- a/skeema/gradido_community/transaction_types.sql +++ b/skeema/gradido_community/transaction_types.sql @@ -1,6 +1,6 @@ CREATE TABLE `transaction_types` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(24) COLLATE utf8_bin NOT NULL, - `text` varchar(255) COLLATE utf8_bin NOT NULL, + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(24) NOT NULL, + `text` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB; diff --git a/skeema/gradido_community/transactions.sql b/skeema/gradido_community/transactions.sql index 392ea2e5e..c6072d20c 100644 --- a/skeema/gradido_community/transactions.sql +++ b/skeema/gradido_community/transactions.sql @@ -1,9 +1,9 @@ CREATE TABLE `transactions` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `state_group_id` int(11) DEFAULT NULL, - `transaction_type_id` int(11) NOT NULL, + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `state_group_id` int UNSIGNED DEFAULT NULL, + `transaction_type_id` int UNSIGNED NOT NULL, `tx_hash` binary(32) DEFAULT NULL, - `memo` varchar(255) COLLATE utf8_bin NOT NULL, + `memo` varchar(255) NOT NULL, `received` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=InnoDB;