Changing the hmac_key key will prevent existing users from logging in because stored keys cannot be hashed any more. I am pretty sure it does not delete any data. Something else has caused your problem (if indeed the data has disappeared). The only routines in dal.py that ever delete data require that your explicitly call db.table.drop or db.table.truncate.
First of all. Ar you sure your data is deleted or is it just that your queries return nothing? What is exactly in your databases/ folder? What are the creation times of the files in there? Massimo On Feb 7, 11:59 pm, Lewis <lewis_le...@hotmail.com> wrote: > I switched auth to using the proper key: > > originally: auth = Auth(jodb) > > changed to: auth = Auth(jodb, hmac_key=Auth.get_or_create_key()) > > The original worked fine. But, it seemed that using the hmac_key was > preferred. So I changed it. > > Now, all the data in all tables is gone. The auth tables are empty. > The data tables for the application itself are empty. > > ??? > > There is nothing in sql.log. The last entry was from a week ago > indicating successful creation of each table. Nothing since. > > In postgresql in the sql for each table it appears that all the tables > were dropped and created with new constraints. > > for example: > > -- Table: joke > > -- DROP TABLE joke; > > CREATE TABLE joke > ( > id serial NOT NULL, > joketext text, > created_on timestamp without time zone, > created_by integer, > CONSTRAINT joke_pkey PRIMARY KEY (id ), > CONSTRAINT joke_created_by_fkey FOREIGN KEY (created_by) > REFERENCES auth_user (id) MATCH SIMPLE > ON UPDATE NO ACTION ON DELETE CASCADE > ) > WITH ( > OIDS=FALSE > ); > ALTER TABLE joke > OWNER TO postgres; > > Wow. Have you seen DAL do this before? > > It was just test data in a test app and I have a version from a week > ago in csv files, but wow. That's bad. I didn't change anything else > in the model. > > Here are the table definitions: > > jodb.define_table('joke', > Field('joketext', 'text',length=2048, requires = IS_NOT_EMPTY()), > Field('created_on', 'datetime', default=request.now), > Field('created_by', jodb.auth_user)) > > jodb.define_table('category', > Field('name', 'text', requires = IS_NOT_EMPTY())) > > jodb.define_table('joke_category', > Field('joke', jodb.joke), > Field('category', jodb.category), > format = '%(name)s') > > Is this "by design"?