DocCyblade / tkl-mayan-edms

Turnkey Linux - Mayan EDMS
https://www.turnkeylinux.org/mayan-edms
Other
4 stars 12 forks source link

More readable way to install demo data #50

Closed JedMeister closed 7 years ago

JedMeister commented 7 years ago

I spoke with Alon last night about the way that you are including the demo data. Whilst he agreed that it sounds like a good idea, he also said he really doesn't like the big SQL dump file.

His rationale is that it will potentially become a maintenance headache and is really hard to read (so a possible point of malicious injection in the future). Also as the DB will likely change, the SQL dump will most likely need to be completely recreated each build.

He suggested that it should be possible to leverage the Mayan code to add the demo docs programatically. TBH that sounds like a lot of digging and I wouldn't personally take that on (I'm not very familiar with Python) so I'm not sure if it's a practical option. Perhaps upstream could give some guidance? Another option could be to use curl to interact with the frontend and upload the docs that way?

He said that in a worst case scenario, he would accept a SQL dump file but it would need to be quite small/compact and only changing the things that need changing. Perhaps just by doing a vanilla SQL dump, then adding the docs and doing another SQL dump and then do a diff between them can whittle down the bits that are required?

DocCyblade commented 7 years ago

Yeah, already know the pain of updating the SQL dump, so I was already thinking of scrapping the demo data, unless there is a nice way to package as maybe a migration file within django, and I do know there is an API

JedMeister commented 7 years ago

Perhaps put the demo data aside for now then? Maybe a feature request for another day?

Unless of course upstream have some nice way to add new docs from the commandline (would be a handy thing for lots of users IMO).

DocCyblade commented 7 years ago

I think the best way would be Django Migration but I am still learning Python and Django!

I am ok to scrap the demo data to get this moving.

DocCyblade commented 7 years ago

See #51 closing this