https://github.com/hmarzban/ganjoor-mongodb
ganjoor.net database migration to mongodb
https://github.com/hmarzban/ganjoor-mongodb
Last synced: about 1 month ago
JSON representation
ganjoor.net database migration to mongodb
- Host: GitHub
- URL: https://github.com/hmarzban/ganjoor-mongodb
- Owner: HMarzban
- License: mit
- Created: 2020-04-09T22:42:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T08:42:50.000Z (over 5 years ago)
- Last Synced: 2025-03-24T06:52:25.669Z (7 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Ganjoor](https://ganjoor.net/) migration mysql db to mongodb
> Note: before hit `yarn start` be sure to import `./db/dump.sql.gz` to your local database
```sh
$ yarn i # install dependency$ yarn start # start the migration process
$ yarn export:db # export ganjoor mongodb dataset
$ yarn import:db # import ganjoor mongodb dataset to your local db
$ yarn import:sql # import ganjoor mysql database to your local db```
## Collection Schema
It has two collections `Poets` and `Verses`
### Poets collection schema
```js
[
{
"_id" : ObjectId,
"desc" : String,
"name" : String,
"poems" : [
{
"_id" : ObjectId,
"name" : String,
"slug" : String
},
...
]
}
]
```### Verses collection schema
```js
[
{
"_id": ObjectId,
"tile": String,
"slug": String,
"poemId": ObjectId,
"poet": {
"_id": ObjectId
"name": String
}
"verses": [
{
"text": String
},
...
]
}
]
```## More about ganjoor open source project
- [Github page](https://github.com/ganjoor)
- [Databse](https://github.com/ganjoor/ganjoor-db)