Initial commit - mod-playerbots

This commit is contained in:
UltraNix
2021-12-30 17:13:09 +01:00
commit b3d00ccb26
28 changed files with 571 additions and 0 deletions

32
sql/README.md Normal file
View File

@@ -0,0 +1,32 @@
# NEW MODULE - SQL BEST PRACTICES
## Create a new table
**Example:**
```
CREATE TABLE IF NOT EXISTS `table`(
`id` int(11) unsigned NOT NULL,
`column` smallint(6) unsigned,
`active` BOOLEAN DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
```
**Boolean datatype in mysql:**
Use `TinyInt(1)` or `Boolean` (this is the same thing)
`bit(1)` can also work, but it may require a syntax like `b'(0)` and `b'(1)` when inserting (not sure).
If there are multiple booleans in the same table, bit(1) is better, otherwise it's the same result.
## Rules
- Use `InnoDB` as engine for dynamic tables (most likely in the `auth` and `characters` databases).
- Use `MyISAM` for **read-only** tables (in `world` database), but if you're not sure, just use innoDB.
- Use `utf8` as charset.
## Resources
https://www.w3schools.com/sql/sql_datatypes.asp

View File

@@ -0,0 +1,3 @@
-- Put only sql data in this file (insert, update, replace into, delete etc...).
-- If you don't use this database, then delete this file.
-- If no data, just delete this file.

View File

@@ -0,0 +1,3 @@
-- Put only sql data in this file (insert, update, replace into, delete etc...).
-- If you don't use this database, then delete this file.
-- If no data, just delete this file.

View File

@@ -0,0 +1,2 @@
-- Put only sql structure in this file (create table if exists, delete table, alter table etc...).
-- If you don't use this database, then delete this file.

View File

View File

@@ -0,0 +1,3 @@
-- Put only sql data in this file (insert, update, replace into, delete etc...).
-- If you don't use this database, then delete this file.
-- If no data, just delete this file.

View File

@@ -0,0 +1,3 @@
-- Put only sql data in this file (insert, update, replace into, delete etc...).
-- If you don't use this database, then delete this file.
-- If no data, just delete this file.

View File

@@ -0,0 +1,2 @@
-- Put only sql structure in this file (create table if exists, delete table, alter table etc...).
-- If you don't use this database, then delete this file.

View File

View File

@@ -0,0 +1,3 @@
-- Put only sql data in this file (insert, update, replace into, delete etc...).
-- If you don't use this database, then delete this file.
-- If no data, just delete this file.

View File

@@ -0,0 +1,3 @@
-- Put only sql data in this file (insert, update, replace into, delete etc...).
-- If you don't use this database, then delete this file.
-- If no data, just delete this file.

View File

@@ -0,0 +1,2 @@
-- Put only sql structure in this file (create table if exists, delete table, alter table etc...).
-- If you don't use this database, then delete this file.

View File