Remote admin of sqlite - through ssh

636 views
Skip to first unread message

wdtatenh

unread,
Jun 9, 2012, 9:43:27 PM6/9/12
to web...@googlegroups.com
I'm using sqlite for my database on a data intensive website that I want to push up very soon.  I understand I need to go through ssh to administer things remotely.  I definitely need to be able to administer groups and assign membership remotely via ssh.  But will my changes show up if I make changes outside of appadmin provided by web2py?   Some local testing using (python shell and sqlite3) worked but the change didn't show up when I looked at the relevant table with web2py appadmin interface.

I'm presuming I'm missing something here.  Any recommendations?

thanks in advance

pbreit

unread,
Jun 9, 2012, 11:41:24 PM6/9/12
to web...@googlegroups.com
Schema changes made directly to the db will *not* be reflected in your web2py app. Best to edit your models and migrate. Data edits will work fine (except possibly if you violate and validations).

I don't have much of an opinion on the matter but some folks may advise against SQLite as a production db.

wdtatenh

unread,
Jun 10, 2012, 6:18:26 AM6/10/12
to web...@googlegroups.com
Unfortunately, the update didn't occur (was not a schema change) - simple insert to auth_membership table.  Could see change when using local cmd/python shell.  Wasn't visible when I check using appadamin. 

sqlite is fine in this case because the site is not a high traffic site and very low concurrency for transactions which are not monetary.

nick name

unread,
Jun 10, 2012, 7:26:57 AM6/10/12
to web...@googlegroups.com
On Sunday, June 10, 2012 6:18:26 AM UTC-4, wdtatenh wrote:
Unfortunately, the update didn't occur (was not a schema change) - simple insert to auth_membership table.  Could see change when using local cmd/python shell.  Wasn't visible when I check using appadamin. 

sqlite is fine in this case because the site is not a high traffic site and very low concurrency for transactions which are not monetary.

Then you had some transaction issues going on - e.g. you forgot to commit or something like that.

If you use the sqlite3 command line tool, it should default to auto-commit, but you can be sure by typing "commit;"

If you were doing it using dbapi, make sure you commit before closing the database.

Anthony

unread,
Jun 10, 2012, 10:30:41 AM6/10/12
to web...@googlegroups.com
Were you doing the inserts via a web2py shell? If so, you need to call db.commit() for the changes to be committed (db.commit() is allowed but not necessary in regular web2py application code because each request is automatically wrapped in a db transaction and committed at the end of the request).

Anthony


On Sunday, June 10, 2012 6:18:26 AM UTC-4, wdtatenh wrote:
Reply all
Reply to author
Forward
0 new messages