Schemas named PUBLIC under new databases are added to the plan for creation
jamesweakley opened this issue · 4 comments
jamesweakley commented
Blueprint planner should handle the case where the resource doesn't yet exist, but will be created automatically during apply()
teej commented
Databases create an implicit PUBLIC schema. If you declare it yourself, Blueprint should probably merge the user-declared public schema into the implict one, I'll make that work.
As a workaround you can access the implicit schema with:
db = Database(name="mydb")
public = db.find(resource_type=ResourceType.SCHEMA, name="PUBLIC")
I know that's a little janky.
jamesweakley commented
When does that find()
resolve? Is it deferred during planning and executed after the database has been applied?
teej commented
find
is not currently deferred, it searches the in-memory resource tree. Not super useful currently outside of implict resources (like public schema)