name as primary key

This commit is contained in:
ElPumpo
2018-11-04 22:32:56 +01:00
parent 2478021f17
commit 750c125db7
2 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ There is two types of accounts: shared and not shared.
- None-shared accounts are created for every user in the server. They are created in db when player is loaded, Example: property black money
### `addon_account` database information
You must create an account in the database
An addon account must be configured in the database before using it. Don't forget to run a server restart afterwards (you can alternative restart the script and relog all clients)
| `name` | `label` | `shared` |
| -------- | ------- | -------- |
+11 -10
View File
@@ -1,17 +1,18 @@
USE `essentialmode`;
CREATE TABLE `addon_account` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`label` varchar(255) NOT NULL,
`shared` int(11) NOT NULL,
PRIMARY KEY (`id`)
`name` varchar(60) NOT NULL,
`label` varchar(255) NOT NULL,
`shared` int(11) NOT NULL,
PRIMARY KEY (`name`)
);
CREATE TABLE `addon_account_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`account_name` varchar(255) DEFAULT NULL,
`money` double NOT NULL,
`owner` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
`id` int(11) NOT NULL AUTO_INCREMENT,
`account_name` varchar(255) DEFAULT NULL,
`money` double NOT NULL,
`owner` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
);