Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code to only optionally require DBIC #10

Open
frioux opened this issue Aug 18, 2012 · 10 comments
Open

Refactor code to only optionally require DBIC #10

frioux opened this issue Aug 18, 2012 · 10 comments
Milestone

Comments

@frioux
Copy link
Owner

frioux commented Aug 18, 2012

Currently the code is very DBIC centric. You must connect with a DBIC schema at the very least. We should factor out the "runner" part of the DM so that people can slot in whatever they want. So maybe a spartan user will only support .sql files run with a raw $dbh, or maybe someone special wants to use Rose::DB or DBIDM instead of DBIC for .pl migrations (probably a bad idea unless they have an ::SL replacement, but still.)

@mohawk2
Copy link
Collaborator

mohawk2 commented Mar 9, 2019

Is this really a problem?

@frioux
Copy link
Owner Author

frioux commented Mar 9, 2019 via email

@mohawk2
Copy link
Collaborator

mohawk2 commented Mar 14, 2019

I'm not opposed. I think it would be necessary to:

  • abstract out all the current uses of ->schema into the things that use them
  • isolate those into another interface thingy like VersionStorage, maybe DBStorage
  • provide an alternative DBStorage that could talk directly to a $dbh, and probably the existing DBIC-orientated way could switch to just using that behind the scenes

@mohawk2
Copy link
Collaborator

mohawk2 commented Mar 15, 2019

I am told this includes needing to get the create_ddl_dir out of DBIC.

It would probably be useful to put that into a separate module, which DBIC or a successor could then depend on and use, which would shrink it down.

@frioux
Copy link
Owner Author

frioux commented Mar 15, 2019

Why? DBICH doesn't call that

@mohawk2
Copy link
Collaborator

mohawk2 commented Mar 15, 2019

Good point - but isn't there all the stuff that ends up calling sql_translator_hook? We'll see when I get to it, though.

@frioux
Copy link
Owner Author

frioux commented Mar 15, 2019

yeah but that stuff is "for free" if you are using DBIC; you just won't have it if... you aren't using DBIC

@Altreus
Copy link

Altreus commented Mar 18, 2019

A while ago I was part of a conversation in which vague lamentations were made about the current structure of the code, and how a 2.0 might be structured differently to allow more exensibility.

If we're considering removing the DBIC from DBICDH, would this be a good opportunity to simply create a new module that doesn't have DBIx::Class in its name, and doesn't contain the design decisions we would like to unmake?

@mohawk2
Copy link
Collaborator

mohawk2 commented Mar 18, 2019

I'm open to any specific ideas - you're referring to the install vs deploy discussion? I still want to resolve that.

My feeling is there's no real need to throw the baby out with the bathwater, and we can add possibilities without having to start from scratch.

@frioux
Copy link
Owner Author

frioux commented Mar 19, 2019

If anything I think DBICDH is too extensible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants