Difference between revisions of "Freeside:1.9:Documentation:Developer/FS/Schema"

From Freeside
Jump to: navigation, search
(import from POD)
 
(import from POD)
 
Line 19: Line 19:
 
; dbdef
 
; dbdef
 
:Returns the current database definition (represents the current database, assuming it is up-to-date). See [[Freeside:1.9:Documentation:Developer/DBIx/DBSchema|DBIx::DBSchema]].
 
:Returns the current database definition (represents the current database, assuming it is up-to-date). See [[Freeside:1.9:Documentation:Developer/DBIx/DBSchema|DBIx::DBSchema]].
; dbdef_dist [ OPTION => VALUE ... ]
+
; dbdef_dist [ DATASRC ]
 
:Returns the current canoical database definition as defined in this file.
 
:Returns the current canoical database definition as defined in this file.
 +
 +
:Optionally, pass a DBI data source to enable syntax specific to that database. Currently, this enables "TYPE=InnoDB" for MySQL databases.
  
 
==BUGS==
 
==BUGS==
 
==SEE ALSO==
 
==SEE ALSO==
 
[[Freeside:1.9:Documentation:Developer/DBIx/DBSchema|DBIx::DBSchema]]
 
[[Freeside:1.9:Documentation:Developer/DBIx/DBSchema|DBIx::DBSchema]]

Latest revision as of 19:17, 18 February 2008

NAME

FS::Schema - Freeside database schema

SYNOPSYS

   use FS::Schema qw(dbdef dbdef_dist reload_dbdef);

   $dbdef = reload_dbdef;
   $dbdef = reload_dbdef "/non/standard/filename";
   $dbdef = dbdef;
   $dbdef_dist = dbdef_dist;

DESCRIPTION

This class represents the database schema.

METHODS

reload_dbdef([FILENAME])
Load a database definition (see DBIx::DBSchema), optionally from a non-default filename. This command is executed at startup unless $FS::Schema::setup_hack is true. Returns a DBIx::DBSchema object.
dbdef
Returns the current database definition (represents the current database, assuming it is up-to-date). See DBIx::DBSchema.
dbdef_dist [ DATASRC ]
Returns the current canoical database definition as defined in this file.
Optionally, pass a DBI data source to enable syntax specific to that database. Currently, this enables "TYPE=InnoDB" for MySQL databases.

BUGS

SEE ALSO

DBIx::DBSchema