V8-archive: CLI to Generate schema.sql File

Created on 22 May 2019  Â·  10Comments  Â·  Source: directus/v8-archive

This isn't really a bug, but is causing bugs for certain installations (manual).

Currently the schema.sql file is out of date with the migrations. We need to re-generate this file every time the schema or data changes in the migration files.

Alternatively, @rijkvanzanten has requested that a CLI endpoint for generating the file... but perhaps this is not needed if we always keep the schema file up-to-date when changing migrations?

enhancement question

All 10 comments

but perhaps this is not needed if we always keep the schema file up-to-date when changing migrations?

Changing the schema.sql manually is very error prone, creating it fresh every time a migration is changed is very cumbersome and easy to forget

What do you recommend @rijkvanzanten, the CLI?

@bjgajjar — any idea how long that CLI would take to create?

I think we should focus on bugs for now, but after that we could add it.

@benhaynes - I'll get back to you soon on this but right now let's focus on the bugs only :)

Since this file has now been manually generated, I will convert this to a feature request for the CLI/automation.

To achieve better clarity/visibility, we are now tracking feature requests within the Feature Request project board.

This issue being closed does not mean it's not being considered.

Since this file has now been manually generated

Has it?

Hmm, it says it was updated 3d ago...

https://github.com/directus/api/blob/master/src/schema.sql

@bjgajjar — have you manually updated this file so it uses all the most recent migrations, etc. It should be a 100% clean install of Directus.

@rijkvanzanten

Yeah you can check it from #1020

@benhaynes

Yeah, I manually updated it.

Was this before or after the change that sets directus_activity to timeline?

No, the timeline layout occurs after merging #964. So by default now we have a timeline layout instead of tabular.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pikzelz picture pikzelz  Â·  32Comments

shartley76 picture shartley76  Â·  40Comments

ybelenko picture ybelenko  Â·  31Comments

benhaynes picture benhaynes  Â·  26Comments

cristianopolicarpo picture cristianopolicarpo  Â·  27Comments