modules.zendframework.com icon indicating copy to clipboard operation
modules.zendframework.com copied to clipboard

Changing the current DB structure

Open ins0 opened this issue 8 years ago • 5 comments

I would like to suggest and create a PR with a new DB structure.

The current design isn't nice at all and cause trouble along the way. The modules table isn't well normalized and cause trouble when it comes to "which user uploaded a module" - user repo? company repo? or when a user is changing his github name (not possible currently). On the other side i would like to prepare the site to support different modules from ZF2 and upcoming ZF3.

I will upload the suggested db image today when i'm back home.

So in the meantime i would like to get some feedback if you think this is a good or bad idea and if we should switch with this change to a ORM (doctrine).

// edit i didn't make it yesterday because i was busy assembling my new barbecue grill :meat_on_bone: :meat_on_bone: - so i hacked this layout together - not optmimal and missing some stuff but you can see where this ship is heading towards.

db

/cc @Ocramius @localheinz @GeeH @adamlundrigan @gianarb

ins0 avatar Sep 14 '15 09:09 ins0

Hi @ins0 This proposal sounds good.. This is a strong feature :)

If we would implement doctrine we can use all other tools (migrations, fixtures) to increase our workflow

gianarb avatar Sep 14 '15 09:09 gianarb

True @gianarb - i think we already tried to implement migrations but i'm not quite sure. I added a first suggestion for the db.

I think it would be a good way if we also save the required zf version for a module, so as a main feature this would sorting search results by required zf2 version easy?! But not sure if this could be added later because we can't get this information easy from allready registered modules.

ins0 avatar Sep 15 '15 14:09 ins0

@gianarb @ins0

I'd second the use of Doctrine, and I'm happy to help!

localheinz avatar Sep 15 '15 16:09 localheinz

@gianarb @ins0

Here's probably how I would do this, as it's a bit of work:

  1. switch to using doctrine/orm in the first place
  2. start using doctrine/migrations
  3. make changes to the schema

What do you think? All at once, that's too much - and there's probably hardly anyone willing to code review that. Let's take small steps!

localheinz avatar Sep 15 '15 16:09 localheinz

@ins0 now we have migrations :P Can we apply this change in your opinion?

gianarb avatar Oct 19 '15 06:10 gianarb