#12366 closed defect (cantfix)
Problem on trac database migrate.
Reported by: | Owned by: | Jun Omae | |
---|---|---|---|
Priority: | normal | Component: | TracMigratePlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description (last modified by )
Hi, I tried to migrate database from sqlite to mysql. I tried to use methods mentioned on TracMigratePlugin.
After completing process provided there and tried to create new ticket, I got this error
Table 'trac.sqlite_master' doesn't exist
Am I doing some thing wrong?
Attachments (0)
Change History (6)
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 9 years ago by
Keywords: | needinfo added |
---|
comment:4 Changed 9 years ago by
Hi, sorry for delayed response.
In my environment, we are using our custom authentication plugin using our own user database.
In one of the method
# ITicketChangeListener methods def ticket_created(self, ticket):
there is hard coded query using sqlite_master table. The code snippet is.
table = cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='customer_ticket_identifier';")
if not table.fetchall(): cursor.execute("""CREATE TABLE %s(ticket_id int, distributor_id varchar(30), retailer_id varchar(30), customer_id varchar(30))""" % table_name)
which seems like it is our own requirement. (I am not the original developer of the plugin).
Seems like if this code is removed, it will do no harm.
Can you guys provide some insight on this?
comment:5 Changed 9 years ago by
Keywords: | needinfo removed |
---|---|
Resolution: | → cantfix |
Status: | new → closed |
If you are using Trac 1.0.3 or later, you can use get_table_names()
, which is introduced in trac:r12710, to retrieve a list of table names.
comment:6 Changed 9 years ago by
Or even go a step further and redesign your plugin to create the table in an IEnvironmentSetupParticipant. Creating a table in an ITicketChangeListener
method is quite a hack!
Strange. It consider that one of installed plugins doesn't support databases other than SQLite. Could you please post the details about: