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

Create DDL syntax without the need of temp files and directories #67

Open
wants to merge 2 commits into
base: current/for_cpan_index
Choose a base branch
from

Conversation

waterkip
Copy link

Hello, at work we needed to generate the SQL DDL based on the current schema, but without the hassle of temp files and directories. I've introduced create_ddl which does this.

…ss into sql_to_string

Conflicts:
	lib/DBIx/Class/Storage/DBI.pm
	t/storage/deploy.t
@castaway
Copy link
Contributor

I haven't read the code in depth but.. how does if differ from just calling ->deployment_statements?

@waterkip
Copy link
Author

Valid point. From what I saw deployment_statements looks at the existence of generated files, I want the SQL generated on the fly regardless of files on disk.

@ribasushi
Copy link
Collaborator

@waterkip You can always supply a /nonexistant $dir argument and have deployment_statements not return anything pregenerated. The default to look in ./ is unfortunate, yes, but it seems to me does not warrant an entire new method.

Let us know what you think of the above (perhaps with an extra documentation addition).

@waterkip
Copy link
Author

I'll have a look.. although the nonexistent dir is a bit of a (icky) workaround.

@ribasushi
Copy link
Collaborator

@waterkip You are quite right that /nonexistent is pretty icky. Given that undef is also taken as a valid argument, what about special-casing (and documenting) q{} (empty string) as the API for "do not check the FS at all" ?

@ribasushi ribasushi reopened this Feb 26, 2016
@ribasushi
Copy link
Collaborator

@waterkip Apologies for the closure of this issue - github did a number on me due to how it operates wrt disappearing branches.

The issue is still on the radar, and will be merged when the underlying piece falls in place (any moment now). Sorry about that.

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