lamed_mysql
v0.0.3
Published
Generate mysql create table scripts
Downloads
2
Readme
lamed_mysql
Generate create tables scripts from json specification.
- Sample json file:
{
"config": {
"databaseName": "ig_clone",
"table_timestamp" : "{T}",
"table_noFields" : "!",
"table_fieldSeperator" : "|-|",
"field_defaultType" : "VARCHAR(255)",
"field_unique" : "#",
"field_nullable": "@",
"relation_1toMany" : "<--",
"relation_many2Many" : "<-->",
"relation_manyTableSeperator": "||"
},
"tables": [
"users{T} |-|username#,password@,email#",
"photos{T} |-|image_url",
"comments{T}|-|comment_text",
"tags{T} |-|tag_name",
"photo_tags!",
"likes{T}",
"follows{T}"
],
"relationships": [
"users <--photos",
"users <--comments",
"photos<--comments",
"users <-->photos||likes",
"users <-->users ||follows",
"photos<-->tags ||photo_tags",
"follow_reason<--followers_following"
],
"data": [
{
"follow_reason": [
"follower",
"following"
]
}
]
}