Dropped the need for the 'id' column in the page table
This commit is contained in:
parent
ed94d6bad2
commit
fcd2593a9e
3 changed files with 8 additions and 7 deletions
|
|
@ -50,7 +50,8 @@
|
|||
- bugfix [ 996170 ] mesage log logId not being passed
|
||||
- Added template variables user.canPost and user.canView in forum_loop to MessageBoard / RFE[864134] (Leendert Bottelberghs)
|
||||
- Made flat thread work like flat thread -> messages sorted by submission date / RFE[995982]. (Leendert Bottelberghs)
|
||||
|
||||
- Upgraded DBIx::Tree::NestedSet to the latest version (0.15) (Martin Kamerbeek /Procolix)
|
||||
- Eliminated the use for the 'id' column in the page table (Martin Kamerbeek /Procolix)
|
||||
|
||||
|
||||
6.1.1
|
||||
|
|
|
|||
|
|
@ -266,3 +266,4 @@ create table urls (
|
|||
params text
|
||||
);
|
||||
|
||||
alter table page drop column id;
|
||||
|
|
|
|||
|
|
@ -209,15 +209,12 @@ sub add {
|
|||
|
||||
$newPageId = WebGUI::Id::generate();
|
||||
$self->add_child_to_right(
|
||||
id =>$self->get('pageId'),
|
||||
pageId =>$newPageId,
|
||||
pageId =>$self->get('pageId'),
|
||||
provided_primary_key => $newPageId,
|
||||
parentId=>$self->get('pageId'),
|
||||
depth =>($self->get('depth') + 1),
|
||||
);
|
||||
|
||||
# Fixup the 'id' column that has the wrong value.
|
||||
WebGUI::SQL->write("update page set id=pageId where pageId=".quote($newPageId));
|
||||
|
||||
$self->recacheNavigation;
|
||||
|
||||
return WebGUI::Page->new($newPageId);
|
||||
|
|
@ -1341,9 +1338,11 @@ sub new {
|
|||
table_name => 'page',
|
||||
left_column_name => 'nestedSetLeft',
|
||||
right_column_name => 'nestedSetRight',
|
||||
id_name => 'pageId',
|
||||
dbh => $session{dbh},
|
||||
no_alter_table => 1,
|
||||
no_locking => 1
|
||||
no_locking => 1,
|
||||
no_id_creation => 1,
|
||||
);
|
||||
unless (ref($properties)) {
|
||||
$properties = WebGUI::SQL->quickHashRef("select * from page where pageId=".quote($_[1]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue