Correction: only the auth tables were dropped and recreated and the one table that had a foreign key to auth. So, it is linked to the change to auth. It looks like that instead of just hashing passwords with a different key (which would have invalidated all the old passwords, of course--this is what I thought would happen) the auth tables had to be rebuilt from scratch.
I still have somewhat cold tingles... On Feb 7, 9: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"?