Doubt about an Extension to store information on the SQL database

Hi guys,

I’d like to hear a tip from you about a RT extension store information
on the SQL database. In other words, I need that my extension has some
place in the SQL database to store some information (this information
is preferences database for my extension)

My initial ideia was to create a new table in the RT database, something like:

CREATE TABLE myextension_prefs (
id INTEGER NOT NULL AUTO_INCREMENT,
prefs_name varchar(30) NOT NULL ,
prefs_value varchar(30) NOT NULL ,
PRIMARY KEY (id)
) TYPE=InnoDB;

CREATE INDEX myextension_prefs1 on myextension_prefs(prefs_name);

But… I really didn’t like the ideia of modify the RT database only
for my extension (in addition, I dont know how I’d do this in the
install of the extension – only put a note on the README would be
enough?).

So, what do you guys think about? What would be the best way to solve
the above problem?

Thank you for any help!

Kind Regards, Italo.

Saudações,

Italo Valcy :: http://wiki.dcc.ufba.br/~ItaloValcy

Hi guys,

I’d like to hear a tip from you about a RT extension store information
on the SQL database. In other words, I need that my extension has some
place in the SQL database to store some information (this information
is preferences database for my extension)

I suspect you want RT::Attributes - this sounds like exactly what they’re for.

Hi Jesse,On Sat, Oct 23, 2010 at 9:22 PM, Jesse Vincent jesse@bestpractical.com wrote:

On Fri, Oct 22, 2010 at 08:18:36PM -0300, Italo Valcy wrote:

Hi guys,

I’d like to hear a tip from you about a RT extension store information
on the SQL database. In other words, I need that my extension has some
place in the SQL database to store some information (this information
is preferences database for my extension)

I suspect you want RT::Attributes - this sounds like exactly what they’re for.

Yes!! Its exactly what I want!! RT is a really great tool!!!
Congratulations guys for this beautiful tool.

PS: I was thinking about to use _CoreAccessible to create my SQL
table, but in that way I should worry about queries, ACLs and so on…
RT::Attributes already has everything I need! :slight_smile: And, if it doesn’t, I
can just write a Callback… :slight_smile: really cool. Thank you!

Kind Regards, Italo.

Saudações,

Italo Valcy :: http://wiki.dcc.ufba.br/~ItaloValcy

Hi Jesse,

Hi guys,

I’d like to hear a tip from you about a RT extension store information
on the SQL database. In other words, I need that my extension has some
place in the SQL database to store some information (this information
is preferences database for my extension)

I suspect you want RT::Attributes - this sounds like exactly what they’re for.

Yes!! Its exactly what I want!! RT is a really great tool!!!
Congratulations guys for this beautiful tool.

Thanks! I’m glad RT has what you need :slight_smile:

Best,
Jesse