new lib::sql::Table ( name => "Editor", cols => [ { name => "ID", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Login", type => new lib::sql::type::Char ( size => 15, not_null => 1 ) }, { name => "Password", type => new lib::sql::type::Char ( size => 15, not_null => 1 ) }, { name => "Email", type => new lib::sql::type::Char ( size => 255, not_null => 1 ) }, { name => "First_Name", type => new lib::sql::type::Char ( size => 50 ) }, { name => "Family_Name", type => new lib::sql::type::Char ( size => 50 ) }, { name => "Disabled", type => new lib::sql::type::Int ( not_null => 1 ) } ], pk => [ "ID" ], ai => "ID", unique => { login_uk => ["Login"] }, ai => "ID", bless_into => "flo::Record::Editor" ); new flo::Category ( name => "Document", cols => [ { name => "ID", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Parent_ID", type => new lib::sql::type::Int() }, { name => "Cache_Control", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Template", type => new lib::sql::type::Char ( size => 255, not_null => 1 ) }, { name => "Description", type => new lib::sql::type::Text() }, { name => "Keywords", type => new lib::sql::type::Char ( size => 255, not_null => 1 ) }, { name => "Date_Created", type => new lib::sql::type::DateTime ( not_null => 1 ) }, { name => "Date_Last_Modified", type => new lib::sql::type::DateTime ( not_null => 1 ) }, { name => "Editor_Created_ID", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Editor_Last_Modified_ID", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Name", type => new lib::sql::type::Char ( not_null => 1, size => 50 ) }, { name => "Full_Path", type => new lib::sql::type::Char ( not_null => 1, size => 255 ) }, { name => "Title", type => new lib::sql::type::Char ( size => 255 ) }, { name => "Lang", type => new lib::sql::type::Char ( not_null => 1, size => 8 ) }, { name => "Rights", type => new lib::sql::type::Text() }, { name => "Publisher", type => new lib::sql::type::Text() }, { name => "Source", type => new lib::sql::type::Text() }, { name => "Relation", type => new lib::sql::type::Text() }, { name => "Coverage", type => new lib::sql::type::Text() }, { name => "Body", type => new lib::sql::type::Text() }, { name => "Sibling_Position", type => new lib::sql::type::Int() }, { name => "Sort_By", type => new lib::sql::type::Char ( size => 50 ) }, { name => "Order_By", type => new lib::sql::type::Int() }, ], unique => { Full_Path_UK => [ qw /Full_Path/ ] }, index => { Parent_ID_IDX => [ qw /Parent_ID/ ] }, selectbox => { Parent_ID => [ qw /Document ID Full_Path/ ] }, category_id => "ID", category_parent => "Parent_ID", category_name => "Name", category_path => "Full_Path", category_position => "Sibling_Position", pk => [ "ID" ], ai => [ "ID" ], fk => { Editor => { Editor_Created_ID => 'ID', Editor_Last_Modified_ID => 'ID', }, }, weight => { Keywords => 10, Description => 8, Title => 10, Name => 10, Full_Path => 5, Lang => 3, Rights => 3, Publisher => 3, Relation => 3, Coverage => 3, Body => 1, }, bless_into => 'flo::Record::Document' ); new lib::sql::Table ( name => "Redirect", cols => [ { name => "ID", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Old_Path", type => new lib::sql::type::Char ( size => 255, not_null => 1 ) }, { name => "New_Path", type => new lib::sql::type::Char ( size => 255, not_null => 1 ) } ], pk => [ "ID" ], unique => { Old_New_Uk => [ qw /Old_Path/ ] }, ai => "ID", bless_into => 'flo::Record::Redirect' ); new lib::sql::Table ( name => "Base_Document", cols => [ { name => "ID", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Editor_ID", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Document_ID", type => new lib::sql::type::Int ( not_null => 1 ) } ], pk => [ "ID" ], ai => "ID", unique => { Editor_Document_Owner_uk => [ qw/Editor_ID Document_ID/ ] }, selectbox => { Editor_ID => [ qw /Editor ID Login/ ], Document_ID => [ qw /Document ID Full_Path/ ] }, fk => { Editor => { Editor_ID => 'ID' }, Document => { Document_ID => 'ID' }, } ); new lib::sql::Table ( name => "Contributor", cols => [ { name => "ID", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Editor_ID", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Document_ID", type => new lib::sql::type::Int ( not_null => 1 ) } ], pk => [ "ID" ], ai => "ID", unique => { Editor_Document_Contributor_uk => [ qw /Editor_ID Document_ID/ ] }, selectbox => { Editor_ID => [ qw /Editor ID Login/ ], Document_ID => [ qw /Document ID Full_Path/ ], }, fk => { Editor => { Editor_ID => 'ID' }, Document => { Document_ID => 'ID' }, }, bless_into => 'flo::Record::Contributor' ); new lib::sql::Table ( name => "Poll_Results", cols => [ { name => "ID", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "Poll_ID", type => new lib::sql::type::Char ( size => 10, not_null => 1 ) }, { name => "Answer", type => new lib::sql::type::Char ( size => 10, not_null => 1 ) }, ], pk => [ "ID" ], ai => "ID" ); new lib::sql::Table ( name => "Session", cols => [ { name => "ID", type => new lib::sql::type::Char ( size => 50, not_null => 1 ) }, { name => "Last_Time", type => new lib::sql::type::Int ( not_null => 1 ) }, { name => "IP", type => new lib::sql::type::Char ( size => 20 ) }, { name => "Editor_ID", type => new lib::sql::type::Int ( not_null => 1 ) }, ], pk => [ "ID" ], fk => { Editor => { Editor_ID => "ID" } }, selectbox => { Editor_ID => [ qw /Editor ID Login/ ] } ); 1;