A very nice piece of information would be WHICH CONSTRAINT? That's what I hate about Oracle.
Does anyone know if it's OK to change the name of this constraint (once I find it) on the database side without breaking my web2py application?
Regards,
Bill
Here's my saga then...
I took the welcome app, added my oracle connection string and edited
##
create all tables needed by auth if not custom tables
auth.define_tables(username=True, signature=True, migrate=False)
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.
| Traceback (most recent call last): |
db.auth_user | New Record |
---|---|
db.auth_group | New Record |
db.auth_membership | New Record |
db.auth_permission | New Record |
db.auth_event | New Record |
db.auth_cas | New Record |
auth.define_tables(username=True, signature=False, migrate=False, fake_migrate=False)
The migrate=false here was an attempt to supress the
Error:
Traceback (most recent call last):
File "C:\web2py\gluon\restricted.py", line 209, in restricted
exec ccode in environment
File "C:/web2py/applications/welcome/controllers/default.py", line 75, in <module>
File "C:\web2py\gluon\globals.py", line 186, in <lambda>
self._caller = lambda f: f()
File "C:/web2py/applications/welcome/controllers/default.py", line 21, in index
return dict(form=auth.wiki())
File "C:\web2py\gluon\tools.py", line 3198, in wiki
return self._wiki.read(slug)['content'] if slug else self._wiki()
File "C:\web2py\gluon\tools.py", line 4647, in __call__
return self.read(zero)
File "C:\web2py\gluon\tools.py", line 4695, in read
return dict(content=XML(self.fix_hostname(page.html)))
File "C:\web2py\gluon\tools.py", line 4678, in fix_hostname
return body.replace('://HOSTNAME','://%s' % self.host)
AttributeError: 'NoneType' object has no attribute 'replace'
def index():
"""
example action using the internationalization operator T and flash
rendered by views/default/index.html or views/generic.html
if you need a simple wiki simple replace the two lines below with:
return auth.wiki()
"""
response.flash = T("Welcome to web2py!")
return auth.wiki()