Indefero

Indefero Commit Details


Date:2012-05-15 15:38:27 (12 years 7 months ago)
Author:Thomas Keller
Branch:develop, release-1.3
Commit:831439120cc273305558a136dfbc37c3a1a336b3
Parents: 6bb886b92a426f464026f91addae23a920210d10
Message:Make the current_activity field in IDF_Project nullable and fix a problem in the migration 25's down method (issue 800)

Changes:

File differences

NEWS.mdtext
22
33
44
5
6
7
8
9
10
11
12
13
5
6
7
8
9
10
11
12
13
14
15
1416
1517
1618
## Bugfixes
- If an anonymous or authenticated user had no access
to any project in a forge, all projects were listed
for him (but still no one was actually accessible).
This has been fixed.
- Fixed a problem where the SyncGit plugin doesn't properly
updates the authorized_keys file when the public key
data contained slashes (thanks to Simon Gareste for the
fix!)
- If an anonymous or authenticated user had no access to any project in a
forge, all projects were listed for him (but still no one was actually
accessible). This has been fixed.
- Fixed a problem where the SyncGit plugin doesn't properly updates the
authorized_keys file when the public key data contained slashes (thanks
to Simon Gareste for the fix!)
- Under PostgreSQL new projects could not be created due to a failing
foreign key relation. Adding project tags was not possible for a similar
reason. This has been fixed (issue 800, continued).
# InDefero 1.3.2 - Wed May 09 20:05 2012 UTC
src/IDF/Migrations/25NullableProjectInTag.php
3737
3838
3939
40
4041
4142
4243
function IDF_Migrations_25NullableProjectInTag_down($params=null)
{
$engine = Pluf::f('db_engine');
$db = Pluf::db();
if ($engine === 'PostgreSQL') {
$db->execute('ALTER TABLE '.$db->pfx.'idf_tags ALTER COLUMN project SET NOT NULL');
src/IDF/Migrations/26NullableActivityInProject.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
# ***** BEGIN LICENSE BLOCK *****
# This file is part of InDefero, an open source project management application.
# Copyright (C) 2008-2012 CĂ©ondo Ltd and contributors.
#
# InDefero is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# InDefero is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# ***** END LICENSE BLOCK ***** */
function IDF_Migrations_26NullableActivityInProject_up($params=null)
{
$engine = Pluf::f('db_engine');
$db = Pluf::db();
if ($engine === 'PostgreSQL') {
$db->execute('ALTER TABLE '.$db->pfx.'idf_projects ALTER COLUMN current_activity DROP NOT NULL');
} else if ($engine === 'MySQL') {
$db->execute('ALTER TABLE '.$db->pfx.'idf_projects MODIFY current_activity MEDIUMINT NULL');
// this is only needed for non-transactional setups where MySQL set 0 as default value
$db->execute('UPDATE '.$db->pfx.'idf_projects SET current_activity=NULL WHERE current_activity=0');
}
}
function IDF_Migrations_26NullableActivityInProject_down($params=null)
{
$engine = Pluf::f('db_engine');
$db = Pluf::db();
if ($engine === 'PostgreSQL') {
$db->execute('ALTER TABLE '.$db->pfx.'idf_projects ALTER COLUMN current_activity SET NOT NULL');
} else if ($engine === 'MySQL') {
$db->execute('ALTER TABLE '.$db->pfx.'idf_projects MODIFY current_activity MEDIUMINT NOT NULL');
}
}
src/IDF/Project.php
105105
106106
107107
108
109
108110
109111
110112
'type' => 'Pluf_DB_Field_Foreignkey',
'model' => 'IDF_ProjectActivity',
'blank' => true,
'is_null' => true,
'default' => null,
'verbose' => __('current project activity'),
),
);
src/IDF/Tag.php
5050
5151
5252
53
5354
5455
5556
'model' => 'IDF_Project',
'blank' => true,
'is_null' => true,
'default' => null,
'verbose' => __('project'),
),
'class' =>

Archive Download the corresponding diff file

Page rendered in 0.09215s using 14 queries.