postgis extenstion not being created

11 views
Skip to first unread message

shawncrawley

unread,
Jun 15, 2017, 2:01:12 PM6/15/17
to Tethys Platform
Here is my PersistentStoreDatabaseSetting:

PersistentStoreDatabaseSetting(
    name=DB_NAME,
    description='Primary database for storing user, organization, and project data',
    required=True,
    initializer='epanet.init_stores.init_epanet_db',
    spatial=True
)

When running 
tethys syncstores myapp

I get the following in the terminal:

Creating database "epanet_2" for app "epanet"...
06-15 17:52:16 tethys INFO Creating database "epanet_2" for app "epanet"...
Enabling PostGIS on database "epanet_2" for app "epanet"...
06-15 17:52:16 tethys INFO Enabling PostGIS on database "epanet_2" for app "epanet"...
Initializing database "epanet_2" for app "epanet" with initializer "epanet.init_stores.init_epanet_db"...
06-15 17:52:16 tethys INFO Initializing database "epanet_2" for app "epanet" with initializer "epanet.init_stores.init_epanet_db"...

The database does get successfully created, however it turns out that the spatial extension was not actually enabled. If I manually enable it right after using pgAdmin with the command "CREATE EXTENSION IF NOT EXISTS postgis;" then it is created. I'm just baffled at why it would not be working through the "tethys syncstores" command. Has anyone else experienced this issue?
Reply all
Reply to author
Forward
0 new messages