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: