development:mysql
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
development:mysql [2012/11/12 22:45] – created s0600204 | development:mysql [2017/05/07 11:09] (current) – Lars Knickrehm | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | This page is dedicated to the development | + | This page is dedicated to the documentation |
- | For the moment, the technical details of how to connect oneye to the database are not important. What's currently being discussed is how data should be stored within | + | Any suggestions, concerns, problems or other should be brought to light on the forums, specifically [[http:// |
- | * What tables are required, and what they should be called | + | |
- | * What fields are required inside | + | |
- | * What the fields should be named | + | |
- | * What format | + | |
- | * What length the fields should be | + | |
- | Please note that modifications should only be made to this page __after__ they' | + | ==== The Codebase ==== |
+ | |||
+ | As with all current development | ||
==== The Database ==== | ==== The Database ==== | ||
- | The database format is mySQL. | + | The database format is mySQL. |
+ | |||
+ | The method used to connect to the database from PHP is the mySQLi Extension, included by default with PHP and compatible with databases created with mySQL v4.1 and later (current stable version: v5.1). | ||
+ | |||
+ | == Constants == | ||
+ | The values of these constants | ||
+ | ^ Constant Description | ||
+ | | mySQL Server Address | | ||
+ | | Database Name | | ||
+ | | Database Username | MYSQL_USERNAME | ||
+ | | Database Password | MYSQL_PASSWORD | ||
==== The Tables ==== | ==== The Tables ==== | ||
- | List of suggested | + | List of currently implementated |
- | * **tblUser** - Main table that contains user data | + | * **tblUser** - Main table that contains user data. |
+ | * **tblGroups** - Table listing which users belong to which groups. Always checked. | ||
+ | * **tblMaintainedUsers** - This table lists the maintainers and their assigned users. Only checked if the // | ||
+ | * **tblMaintainedGroups** - This table lists the maintainers and their assigned groups. Only checked if the // | ||
Line 26: | Line 36: | ||
== tblUser == | == tblUser == | ||
- | ^ Field Name | + | ^ Field Name |
- | | | + | | |
- | | | + | | |
- | | email | | + | | email | varchar |
- | | quota | | + | | quota | |
- | | | + | | |
- | | | + | | |
- | | expirationDate | | + | | lastLogin | integer |
- | | | + | | expirationDate | integer |
- | | | + | | |
- | | | + | | |
+ | | maintainer | ||
+ | == tblGroups == | ||
+ | ^ Field Name ^ | ||
+ | | | ||
+ | | groupname | varchar | ||
+ | |||
+ | == tblMaintainedUsers == | ||
+ | ^ Field Name ^ | ||
+ | | | ||
+ | | | ||
+ | |||
+ | == tblMaintainedGroups == | ||
+ | ^ Field Name ^ | ||
+ | | | ||
+ | | groupname | varchar | ||
==== Reference ==== | ==== Reference ==== | ||
Line 45: | Line 70: | ||
== List of field types in mySQL databases: == | == List of field types in mySQL databases: == | ||
* String types: | * String types: | ||
- | * **varchar** - Variable length. Ideal storage if we don't know how long a string is going to be. | + | * **varchar** - Variable length. Ideal storage if we don't know how long a string is going to be. Requires specification of a maximum length. |
* **char** - Fixed length. Ideal if a string will always be a certain length. Maximum length is 255 characters. | * **char** - Fixed length. Ideal if a string will always be a certain length. Maximum length is 255 characters. | ||
* Integer types: (Each has a different range of possible values) | * Integer types: (Each has a different range of possible values) | ||
Line 62: | Line 87: | ||
* password (hashed) | * password (hashed) | ||
- | * quota | + | * quota (in bytes) |
* fullname | * fullname | ||
* createDate (date expressed as number of seconds since unix epoch) | * createDate (date expressed as number of seconds since unix epoch) | ||
Line 68: | Line 93: | ||
* disabled | * disabled | ||
* lastLogin (date expressed as number of seconds since unix epoch) | * lastLogin (date expressed as number of seconds since unix epoch) | ||
- | * group (comma-separated list) | + | * group (there can be more than one of these) |
+ | * maintainer (0 or 1) | ||
+ | * maintain (group the user maintains) (there can be more than one of these) | ||
+ | * mngUser (there can be more than one of these) | ||
+ | * admin (0 or 1) | ||
+ | |
development/mysql.1352756754.txt.gz · Last modified: 2016/03/07 22:55 (external edit)