Revision 57528e5b
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/DB/MetaSetup/Employee.pm | ||
---|---|---|
15 | 15 |
startdate => { type => 'date', default => 'now' }, |
16 | 16 |
enddate => { type => 'date' }, |
17 | 17 |
notes => { type => 'text' }, |
18 |
role => { type => 'text' }, |
|
19 | 18 |
sales => { type => 'boolean', default => 'true' }, |
20 | 19 |
itime => { type => 'timestamp', default => 'now()' }, |
21 | 20 |
mtime => { type => 'timestamp' }, |
SL/User.pm | ||
---|---|---|
614 | 614 |
($can_delete) = selectrow_query($form, $dbh, qq|SELECT tag FROM schema_info WHERE tag = ?|, 'employee_deleted') if $good_db; |
615 | 615 |
|
616 | 616 |
if (!$id) { |
617 |
my $query = qq|INSERT INTO employee (login, name, workphone, role) VALUES (?, ?, ?, ?)|;
|
|
618 |
do_query($form, $dbh, $query, ($self->{login}, $myconfig->{name}, $myconfig->{tel}, "user"));
|
|
617 |
my $query = qq|INSERT INTO employee (login, name, workphone) VALUES (?, ?, ?)|;
|
|
618 |
do_query($form, $dbh, $query, ($self->{login}, $myconfig->{name}, $myconfig->{tel})); |
|
619 | 619 |
|
620 | 620 |
} elsif ($update_existing && $can_delete) { |
621 |
my $query = qq|UPDATE employee SET name = ?, workphone = ?, role = 'user', deleted = 'f' WHERE id = ?|;
|
|
621 |
my $query = qq|UPDATE employee SET name = ?, workphone = ?, deleted = 'f' WHERE id = ?|; |
|
622 | 622 |
do_query($form, $dbh, $query, $myconfig->{name}, $myconfig->{tel}, $id); |
623 | 623 |
} |
624 | 624 |
|
sql/Pg-upgrade2/remove_role_from_employee.sql | ||
---|---|---|
1 |
-- @tag: remove_role_from_employee |
|
2 |
-- @description: Nicht benutzte Spalte employee.role entfernen |
|
3 |
-- @depends: clients |
|
4 |
-- @charset: utf-8 |
|
5 |
ALTER TABLE employee DROP COLUMN role; |
Auch abrufbar als: Unified diff
Nicht benutzte Spalte employee.role entfernen