-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add database-design.md with database schema section give overview of the tables, data dictionary section explaining the different properties in the tables Add the database er diagram image and file to assets Update api readme to include link to the database design doc
- Loading branch information
Lakshaya
committed
Feb 9, 2024
1 parent
c77fa4b
commit 8aedf1e
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<diagram version="1" name="empty" time="202402091410"><entities><data-source id="mariaDB-18a2afe4364-97643446055c0ad"><entity id="1" name="notify_migrations" fq-name="osmo_notify.notify_migrations" order="0" color-bg="133,88,206" color-fg="255,255,255" font="Segoe UI:9:0" x="49" y="39"><path name="osmo_notify"/></entity><entity id="2" name="notify_notifications" fq-name="osmo_notify.notify_notifications" order="1" color-bg="133,88,206" color-fg="255,255,255" font="Segoe UI:9:0" x="217" y="39"><path name="osmo_notify"/></entity></data-source></entities><relations/></diagram> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Database Design | ||
|
||
This document provides a comprehensive and structured overview of the database design for OsmoX. | ||
|
||
It serves as a reference guide for stakeholders, including developers, database administrators, project managers, and other parties involved in the development, maintenance, and understanding of the application's database. | ||
|
||
The tables discussed below are created as part of the database migration. | ||
|
||
## Database Schema | ||
|
||
The database schema consists of the following 2 tables: | ||
|
||
- **notify_migrations:** Contains the migration records | ||
- **notify_notifications:** Contains details about all the notifications created | ||
|
||
This schema can be visualized in the following image: | ||
|
||
 | ||
|
||
The ERD diagram file for this schema can be accessed [here](./assets/OsmoX_database_schema.erd). | ||
|
||
## Data Dictionary | ||
|
||
### notify_migrations | ||
|
||
| Attribute | Data Type | Not Null | Default | Description | | ||
| --------- | ------------ | -------- | ------- | -------------------------------------------------------------- | | ||
| id | int(11) | True | | Primary key, stores the id value for different migrations | | ||
| timestamp | bigint(20) | True | | Stores the timestamp for when the migration record was created | | ||
| name | varchar(255) | True | | Stores the name of the migration ran | | ||
|
||
### notify_notifications | ||
|
||
| Attribute | Data Type | Not Null | Default | Description | | ||
| --------------- | ------------ | -------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| id | int(11) | True | | Primary key, stores the id value for different notifications | | ||
| channel_type | tinyint(4) | True | | Stores the channel type used for the notification. Can be a value from [Available Channel Types](./usage-guide.md#5-available-channel-types) | | ||
| data | text | True | | Stores JSON data about the notification such as the from/to addresses, subject and body content | | ||
| delivery_status | tinyint(4) | True | 1 | Stores the current delivery status of the notification. Can be a value from [Delivery Status Information](./usage-guide.md#6-delivery-status-information) | | ||
| result | text | False | NULL | Stores the JSON result after attempting to send the notification | | ||
| created_on | timestamp | True | current_timestamp() | Stores the timestamp for the creation of the notification | | ||
| updated_on | timestamp | True | current_timestamp() | Stores the timestamp for the last update to the notification | | ||
| created_by | varchar(255) | True | | Stores the name of the service/app that created the notification | | ||
| updated_by | varchar(255) | True | | Stores the name of the service/app that last updated the notification | | ||
| status | tinyint(4) | True | 1 | Stores whether the notification must be considered as active(1) or inactive(0) | |