Only thing missing from tusker for my use case is the ability to specify several separate patterns in the schema.filename configuration.
Config file sample:
[schema]
filename = "schema/*.sql,procs/**/*.sql"
Here's the diff. I can submit a PR if you want to give me permission.
index 98f695e..0251f37 100644
--- a/tusker/__init__.py
+++ b/tusker/__init__.py
@@ -109,9 +109,10 @@ class Tusker:
with self.createdb('schema') as schema_engine:
with schema_engine.begin() as schema_cursor:
self.log('Creating original schema...')
- for filename in sorted(glob(self.config.schema.filename, recursive=True)):
- self.log('- {}'.format(filename))
- execute_sql_file(schema_cursor, filename)
+ for pattern in self.config.schema.filename.split(","):
+ for filename in sorted(glob(pattern, recursive=True)):
+ self.log('- {}'.format(filename))
+ execute_sql_file(schema_cursor, filename)
yield schema_engine
@contextmanager
Only thing missing from tusker for my use case is the ability to specify several separate patterns in the schema.filename configuration.
Config file sample:
Here's the diff. I can submit a PR if you want to give me permission.