Skip to content

Commit

Permalink
Merge pull request #734 from shimilgithub/api-refactor
Browse files Browse the repository at this point in the history
Tracking visits in landing page and updates on db_changes documentation
  • Loading branch information
shimilgithub authored Oct 11, 2023
2 parents 4435fe4 + 61417d4 commit 1fc8e01
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 10 deletions.
11 changes: 11 additions & 0 deletions app/templates/landing_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@
<!-- custom css for Services -->
<link rel="stylesheet" href="/static/css/services.css">

<!-- Track page visits with google analytics -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-NPKQ4B1WE3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-NPKQ4B1WE3');
</script>

</head>

<body>
Expand Down
44 changes: 34 additions & 10 deletions docs/db_changes.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
# Database Changes Log for Release
# **Database Changes Log for Release**
This document captures all database modifications made during each release . It will serve as a reference guide for future deployments, promoting consistency and ease of use across different setups.


## Beta.31:
### Release Date : 19-09-2023
### Commit Id :7f38ac0b5008341cd923d4cc1d769b2fee47f67a
### PR: [#715](https://github.com/Bridgeconn/vachan-api/pull/715/)
## **Beta.31:**
#### **Release Date : 19-09-2023**
#### **Commit Id :7f38ac0b5008341cd923d4cc1d769b2fee47f67a**
#### **PR: [#715](https://github.com/Bridgeconn/vachan-api/pull/715/)**
This release includes:
- db changes in commentary
- `chapter`.`verseStart` and `verseEnd` columns are removed
- new json field `reference` is added which includes `book`,`chapter`,`verseNumber`,`bookEnd`,`chapterEnd` and `verseEnd`
- Actions performed
- Delete all tables of commentary using `DELETE COMMENTARY` API
- Delete all commentary resources using `DELETE RESOURCE` API
- Add commentary resources using `POST RESOURCE` API
- Upload commentary data(with changed reference structure) using `POST COMMENTARY` API
- Delete all tables of commentary using `DELETE COMMENTARY` API **OR**
```
DROP TABLE <table_name>;
```
- Delete all commentary resources using `DELETE RESOURCE` API **OR**
```
DELETE from resources WHERE resource_name=<commentary_resource_name>;
```
- Add commentary resources using `POST RESOURCE` API **OR**
```
INSERT INTO resources (version,resource_table,year,labels, license_id,resourcetype_id,language_id,version_id,active, metadata)VALUES (<version>,<resource_table>,<year>,<labels>,<license_id>,<resourcetype_id>,<language_id>,<version_id>,t, <metadata>);
```
- Upload commentary data(with changed reference structure) using `POST COMMENTARY` API **OR**
### --------------------------------------------------------------------------------------------------------------------------------------------
```
ALTER TABLE <commentary_table> ADD COLUMN reference JSONB;
UPDATE <commentary_table> SET reference = jsonb_build_object('book', book,
'chapter', chapter,
'verseNumber', verse,
'bookEnd', book,'
'chapterEnd', chapter ,'
'verseEnd', verse);
ALTER TABLE <commnetary_table> DROP COLUMN book,
DROP COLUMN verseStart,
DROP COLUMN verseEnd;
```
### **--------------------------------------------------------------------------------------------------------------------**

0 comments on commit 1fc8e01

Please sign in to comment.