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

support stored procedures in SQLServerDatabaseTasks#structure_dump #955

Open
jonahgeorge opened this issue Nov 21, 2021 · 0 comments
Open

Comments

@jonahgeorge
Copy link
Contributor

jonahgeorge commented Nov 21, 2021

Currently, SQLServerDatabaseTasks#structure_dump supports exporting tables and views; however, the underlying tool defncopy supports stored procedures as well. It would be particularly helpful to export stored procedures from an existing database, especially when activerecord-sqlserver-adapter already supports running them.

My current understanding is that SchemaStatements would need to be extended to return stored procedures (like tables and views on the underlying ActiveRecord connection). A query like the following may suffice:

SELECT distinct routine_schema, routine_name
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE';

Related:

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

1 participant