Skip to content
This repository has been archived by the owner on Sep 13, 2019. It is now read-only.

Improve PostgreSQL support #22

Closed
wants to merge 5 commits into from

Conversation

pmatseykanets
Copy link
Contributor

Covers database objects mentioned in #20 and more

  • Views
  • Tables
  • Functions
  • Sequences
  • Domains (technically it's custom data type)
  • Custom User Types (enums and such)

* Read schema from the connection
* Drop tables in one statement
* Use prepared statements
Covers database objects mentioned in spatie#20 and more
* Views
* Tables
* Functions
* Sequences
* Domains (technically it's custom data type)
* Custom User Types (enums and such)
@pmatseykanets
Copy link
Contributor Author

@freekmurze I decided to drop Names suffix on methods because it's no longer just one getTableNames(). It's becoming too verbose for my taste. But if you feel like it's really important I can totally refactor it in this manner.

@freekmurze
Copy link
Member

freekmurze commented Jan 12, 2017

Hi Peter,

thank you for all the work you put into this. However I'm not going to merge it. I'd like to keep this package mean and small and cater the 80% that just uses the tables. Generally speaking I don't like code in our package that we ourselves do not use or isn't easy maintainable by us.

However I understand that there's a need for some users to perform some extra logic when building up the database from scratch. To cater them I'll introduce these two events soon: AllTablesWillBeDropped, AllTablesHaveBeenDropped. Power users can hook into those events to perform some extra steps. I'm willing to add the code from this PR to our readme, so people can choose to use it if they want it.

Thoughts?

@pmatseykanets
Copy link
Contributor Author

Hi Freek,

If it works for the majority I'm fine with it. Unfortunately it doesn't work for me because in every project where I have PostgreSQL I at least have a function or two and or custom sequences.

May be I'll just create a version of the package with advanced features for PostgreSQL and MySQL.

In any case thanks for consideration.

@freekmurze
Copy link
Member

Meanwhile I've added these events that you can hook into to drop your functions and custom sequences.

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

Successfully merging this pull request may close these issues.

None yet

2 participants