clementinecomputing 5 роки тому
батько
коміт
8c536a4d5d
1 змінених файлів з 33 додано та 0 видалено
  1. 33 0
      Documentation/Database-Schema.md

+ 33 - 0
Documentation/Database-Schema.md

@@ -61,6 +61,8 @@ users
 
 Here is a brief overview of what each table does and where it is used.
 
+---
+
 `active_rider_table`
 ---
 
@@ -93,6 +95,8 @@ The `mag_token` is used here for testing purposes and is not real.
 
 `parent_entity` is deprecated.
 
+---
+
 `user_card`
 ---
 
@@ -120,6 +124,8 @@ The `active` field must be set to `1` for the card to be valid. We have a genera
 
 All alterations to a `user_card`, including insertion, should insert a corresponding entry in `audit_user_card`.
 
+---
+
 `user_pass`
 ---
 
@@ -154,6 +160,7 @@ Having different `group_ids` for `user_card`s and `user_pass`es associated with
 `user_pass` entries should never be deleted under normal circumstances. Instead, set the `expired` flag to 1.
 
 
+---
 
 `avls_data`
 ---
@@ -174,6 +181,8 @@ Having different `group_ids` for `user_card`s and `user_pass`es associated with
 
 Records the GPS position of buses. Should the buses GPRS connectivity be disconnected, the GPS position locations are stored locally and put into the `diagnostic_log table`.
 
+---
+
 `users`
 ---
 
@@ -209,6 +218,8 @@ Holds user information. The ORG store front implicitly uses this data (through t
 
 All updates to users, including new entries, should have a corresponding entry in `audit_users`.
 
+---
+
 `admins`
 ---
 
@@ -223,6 +234,8 @@ All updates to users, including new entries, should have a corresponding entry i
 
 Administrator information for the admin web UI.
 
+---
+
 `groups`
 ---
 
@@ -233,6 +246,8 @@ Administrator information for the admin web UI.
 
 Maps `group_id`s to `group_name`s.
 
+---
+
 `billing_log`
 ---
 
@@ -258,6 +273,8 @@ Maps `group_id`s to `group_name`s.
 | `stop_name`       | `varchar(64)` | `YES`  |     | `NULL`    |                |
 | `seq_num`         | `big int(20)`  | `NO`   | `PRI` | `NULL`    | `auto_increment` |
 
+---
+
 `billing_log_annotation`
 ---
 
@@ -289,6 +306,8 @@ Maps `group_id`s to `group_name`s.
 All of the annotated fields in the `billing_log_annotation` view match the field names from the `billing_log` table (e.g. "route"), and `orig` is prepended to all of the original fields (e.g. `orig_route`), with one important exception.
 The annotated `ride_time` field is called `annotated_ride_time`, and the original `ride_time` field is simply `ride_time`.
 
+---
+
 `rule_class`
 ---
 
@@ -300,6 +319,8 @@ The annotated `ride_time` field is called `annotated_ride_time`, and the origina
 Indicates what type a `rulename` is.
 `ruleclass` may only be `NRIDE`, `NDAY` or `OTHER`
 
+---
+
 `rule_mapping`
 ---
 
@@ -314,6 +335,8 @@ Used in the Admin web UI and elsewhere to map rules to groups and give human rea
 
 Entries with the active set to `0` should be ignored.
 
+---
+
 `pass_option`
 ---
 
@@ -336,6 +359,8 @@ Entries with the active set to `0` should be ignored.
 
 Used in the Admin web UI to provide pass options for a given rule.
 
+---
+
 `price_point`
 ---
 
@@ -359,6 +384,8 @@ Used in the Admin web UI to provide pass options for a given rule.
 
 Used in the store front web interface to display the appropriate options and prices for passes.
 
+---
+
 `org_default_card_value`
 ---
 
@@ -372,6 +399,8 @@ Used in the store front web interface to display the appropriate options and pri
 
 Default values for cards within a group.
 
+---
+
 `org_default_pass_value`
 ---
 
@@ -390,6 +419,8 @@ Default options for NDay or NRide passes.
 
 Used for access control rights for the Popufare API.
 
+---
+
 `update_level`
 ---
 
@@ -410,6 +441,8 @@ Should the `equip_num` field be non-zero, it will be used instead.
 For config or firmware deployment to a subset of buses in the fleet, a non-zero equipment number can be used to deploy to those specific buses.
 After full deployment, those entries should be removed and a default entry with an `equip_num` of `0` should be put in its place.
 
+---
+
 `diagnostic_log`
 ---