Modify

Opened 12 years ago

Closed 8 years ago

Last modified 8 years ago

#10384 closed defect (fixed)

Properly cast `authenticated` field for subscription_attribute table

Reported by: Eygene Ryabinkin Owned by: Steffen Hoffmann
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords:
Cc: Steffen Hoffmann, scottso@…, Bas van der Vlies Trac Release: 0.12

Description (last modified by Ryan J Ollos)

authenticated is an integer in SQL schema, so it should be properly cast: for example, PostgreSQL is picky about this.

Attachments (1)

patch-announcer-model-authenticated-typecasts (3.9 KB) - added by Eygene Ryabinkin 12 years ago.

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by Eygene Ryabinkin

comment:1 Changed 12 years ago by Ryan J Ollos

Cc: Steffen Hoffmann added; anonymous removed

This patch looks correct to me. authenticated is an INT in the database schema (t:TracDev/DatabaseSchema) and is a bool in the Session class, where it is cast to int before writing to the database.

comment:2 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)
Summary: Properly cast "authenticated" field for subscription_attribute tableProperly cast `authenticated` field for subscription_attribute table

comment:3 Changed 12 years ago by Ryan J Ollos

Cc: scottso@… Bas van der Vlies added

#10191 closed as a duplicate. This ticket was kept open since it has a patch. #10191 will be useful for confirming that the same traceback is seen when reproducing the issue.

comment:4 Changed 12 years ago by Ryan J Ollos

#9247 closed as a duplicate.

comment:5 Changed 12 years ago by Bas van der Vlies

bas: Are you also running PostgreSQL?

Yes

comment:6 Changed 12 years ago by anonymous

See also #8065

comment:7 Changed 12 years ago by Ryan J Ollos

#8065 closed as a duplicate, and it has a patch which we may want to review.

comment:8 Changed 12 years ago by Steffen Hoffmann

(In [12302]) TracAnnouncer: Part 7 of 7 - Finally: Go from present to future, refs #5774, #7975, #8065, #9742 and #10384.

Now we've bridged the gap and provide an upgrade path for each historic schema revision of this plugin, while data migration is incomplete yet, especially regarding subscription attributes stored in session_attribute (before v3). Due to component name changes the conversion will be rather complicated, and therefore corresponding research and development is postponed to a future date and will largely depend on explicite demand as well.

comment:9 Changed 12 years ago by Steffen Hoffmann

(In [12303]) TracAnnouncer: Convert type to match db table definitions, refs #7975, #8065 and #10384.

These changes are based on work by olistudent, Stephen Anderson and rea. I made sure, that we respect PEP8 as well, at least as far as Trac core does.

Thanks to all of you for testing, reports and suggestions towards a portable fix, and - ultimately - patience to get it finally resolved.

comment:10 Changed 10 years ago by Ryan J Ollos

Owner: Robert Corsaro deleted

comment:11 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

comment:12 Changed 8 years ago by Ryan J Ollos

Owner: set to Steffen Hoffmann

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.