tarantool / migrations

BSD 2-Clause "Simplified" License
20 stars 5 forks source link

Bootstrap-generator - generate initial migration based on existing schema #9

Open sharonovd opened 4 years ago

LeonidVas commented 2 years ago

Can you add several examples.

sharonovd commented 2 years ago

Smth like

tarantool> require('migrations').bootstrap({url='localhost:3301', file='./00-bootstrap-schema.lua'})
---
- |-
box.schema.create_space('test')
box.space.test.create_index('primary')
sharonovd commented 2 years ago

A helper that traverses existing instance and prepares .lua containing relevat ddl statements.

sharonovd commented 2 years ago

https://stackoverflow.com/questions/1884758/generate-ddl-programmatically-on-postgresql