Modify

Opened 11 years ago

Last modified 4 years ago

#11308 new defect

Doesn't support any DB backend other than SQLite

Reported by: Andras Korn Owned by: bphinz
Priority: normal Component: FieldGroupsPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

Co-opting code from tagsplugin/trunk/tractags/db.py helped with getting the list of tables correctly, but I don't know how to implement the auto-incrementing id field in a backend independent way.

Attachments (0)

Change History (4)

comment:1 Changed 11 years ago by Ryan J Ollos

Could you post of patch of the changes you made?

I thought the cross-database incompatibility issue would have been fixed after [13213], but I didn't take a careful look at the schema in that ticket. We need to define the schema using the classes in browser:/tags/trac-1.0.1/trac/db/schema.py. For example, see: db_default.py.

Version 0, edited 11 years ago by Ryan J Ollos (next)

comment:2 Changed 11 years ago by Andras Korn

Unfortunately no; I gave up on this plugin and have deleted my checkout, including the modifications.

Basically I replaced stuff like

        cursor.execute("SELECT * FROM sqlite_master WHERE name='field_groups' AND type='table'")

with stuff like

        cursor.execute("SELECT tablename
                 FROM pg_tables
                 WHERE tablename='field_groups' AND schemaname = ANY (current_schemas(false))")

comment:3 Changed 11 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

Oh, right. Yeah the check for table existence needs to be fixed as well. Thanks for pointing that out.

comment:4 Changed 4 years ago by Ryan J Ollos

Cc: Ryan J Ollos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain bphinz.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.