So I built a postgres models.py and tried to create the below test data, all of which worked with sqlite.
basedir = os.getcwd()
app = Flask(__name__)
#...omitted for brevity
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['ENV_DB_CONNECTION_DSN'] = 'postgres:///Ocean.db'
db = SQLAlchemy(app)
db.create_all()
#testing starts below this
camelot = Entity(level='Province', name='Camelot',iso_code='CAM')
db.session.add(camelot)
lit = Literal_data(ent_id=1, year=2012, value=2, display_name = 'swallow count', meta_id=1)
db.session.add(lit)
swallow = Meta_indicator_data(p_name = 'swallow count',family = 'animal life',num_type = 'interger',provider = 'camelot bird comission',p_description = 'swallows. duh.')
db.session.add(swallow)
db.session.commit()
the above works fine, i can even query the db with db.engine.execute('select * from ent')
Only problem is I cant find the db file anywhere, including psgadmin III!
any ideas on how to print the db file name? can the above run with no errors without a db file??