Myabe you missed my point 1 ?
When migrating my DB...
1. I have to remember to access a auth.wiki page to make sure my wiki table
definitions are run.
On Tuesday, October 9, 2012 11:19:28 PM UTC+1, Bill Thayer wrote:
>
> Fixing broken migrations...
>>
>> db.define_table(....,migrate=False,fake_migrate=True) means rebuild the
>> table meta data according to the table definitions.
>> db = DAL(...,fake_migrate_all=True) means you are fixing all the tables at
>> once but will not help in narrowing down the problem.
>>
>> Looks like the metadata matches my table definitions. I have narrowed the
>> problem down to wiki page does not exist in the database. Since it doesn't
>> exist in
>> metadata either then what's the problem? Shouldn't the behavior be to create
>> the database table and the table metadata? That is my desire.
>>
>> if I delete all of my meta data that usually creates more problems. But in
>> theory setting migrate=False, fake_migrate_all=True then all the
>> metadata gets rebuilt without touching the database. Not my intention as I
>> want the missing tables added.
>>
>>
>> db = DAL('oracle://uname/pw@dbserver:1521', migrate=False,
>> fake_migrate_all=True)
>>
>>
>> auth.define_tables(username=True, signature=False, migrate=False,
>> fake_migrate=True)
>>
>> Error:
>>
>> <class 'cx_Oracle.DatabaseError'> ORA-00942: table or view does not exist
>>
>>
>> and Welcome /database has 6 auth tables and wiki_<media, page, tag>
>>
>> So this should not build metadata but go ahead and build the tables not in
>> the database:
>>
>> db = DAL('oracle://uname/pw@dbserver:1521', migrate=True)
>>
>> auth.define_tables(username=True, signature=False, migrate=True,
>> fake_migrate=False)
>>
>> Error:
>>
>> <class 'cx_Oracle.DatabaseError'> ORA-00955: name is already used by an
>> existing object
>>
>>
>> No Kidding! There's no way I'm going to delete my auth_user table from
>> Oracle at this point, I have another app using it!
>>
>>
>> Perhaps this will create the missing tables?
>>
>>
>> db = DAL('oracle://uname/pw@dbserver:1521', migrate=True)
>>
>> auth.define_tables(username=True, signature=False, migrate=False,
>> fake_migrate=False)
>>
>> Now my browser is spinning and spinning. I suspect that the rocket server
>> is hung again and I need to stop the process with the task manager. I'll
>> give it a few minutes and see.
>>
>>
>>
>>
>>
>>
>>
--