diff options
| author | Adam Soltys <[email protected]> | 2023-02-06 16:48:13 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-06 16:48:13 -0800 |
| commit | 9c667055c6367e1b2e239686e72f52995679a47e (patch) | |
| tree | 0b1d4aee51ec2d4e92d08a9d1404ba4e2ecd462a /db/normalized/README.md | |
| parent | 15294844dbc8e73b4d1e92008a7eebc6b86b9ec5 (diff) | |
| parent | 6f5602d112b68adb7452abf3047f20c32e7725b6 (diff) | |
| download | coinos-server-9c667055c6367e1b2e239686e72f52995679a47e.tar.gz coinos-server-9c667055c6367e1b2e239686e72f52995679a47e.zip | |
Merge branch 'master' into test
Diffstat (limited to 'db/normalized/README.md')
| -rw-r--r-- | db/normalized/README.md | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/db/normalized/README.md b/db/normalized/README.md deleted file mode 100644 index fd3cb0d3..00000000 --- a/db/normalized/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# General guidelines for Database schema: - -- String fields whose values are NOT open-ended (ie can contain random strings) should be changed to either: - - an FK to a separate lookup table (when the domain of options is large or can grow) - - an enum (when there are a short list of essentailly static options) - -- Field names should follow SQL standards: - - lower case - - underscore_separated_words - -- options for designated models should be standardized with: - { - tableName: "table_name", - comment: "description of table if not self-evident", - timestamps: true, - createdAt: 'created_at', - updatedAt: 'updated_at', - indexes: [ - { <as required> } - ] - }; - - ## Note regarding field attributes specified in model: - - - createdAt, updatedAt are renamed to abide by SQL standard. - - - by default allowNull is false, so this attribute need only be specified when fields are NOT NULL. - - - comment attribute should added to any field that is not self-evident - - - may need to add indexes to more fields for rapid access - - ## Notes regarding changes / updates - - - Some 1-1 tables are split up simply to separate scope or to control access permission (ie only user_preferences table may be edited by users themselves) - - ## Sequelize Operational Questions: - - Are indexes automatically generated by Sequelize migration for primary keys and/or foreign keys ? - - Does Sequelize add non-unique indexes for data mining if specified: eg { fields: ['username'] } - - Do timestamp fields require default value spec (eg Sequelize.NOW) ... or how can we define this in model ? - - ## Ongoing Questions: - - payments table needs to be investigated and refactored - - is invoices table required or is this just summary information ? - - orders table needs to be investigated and refactored - - need to add subscriptions table if applicable ( what is this comprised of ?) - - user_keys table should be commented to clarify application of each of these values. - |
