migrations icon indicating copy to clipboard operation
migrations copied to clipboard

Bootstrap-generator - generate initial migration based on existing schema

Open sharonovd opened this issue 4 years ago • 4 comments

sharonovd avatar Mar 02 '20 08:03 sharonovd

Can you add several examples.

LeonidVas avatar Jan 20 '22 11:01 LeonidVas

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 avatar Jan 20 '22 11:01 sharonovd

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

sharonovd avatar Jan 20 '22 11:01 sharonovd

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

sharonovd avatar Jan 20 '22 11:01 sharonovd