Updates and bugfixes for Thingy:

Bugfixes:
1. maxuser entries not respected in imports.
2. newly created records via CSV are not stored with createdById and dateCreated and ipAddress

Updates:
1. added : Thingy fields can now be set as unique and checked upon insert
2. added : Thingy max entries of thingy records added
This commit is contained in:
Peter Christiansen 2011-04-14 21:27:53 +02:00
parent 96ee557586
commit 1966cc02a7
3 changed files with 176 additions and 18 deletions

View file

@ -24,6 +24,10 @@
- fixed #12076: Paginator shows no results with cached page index
- fixed #12087: Extend WebGUI tests to check template attachments
- fixed #12091: Survey Statistical Overview display
- fixed : Thingy CSV import not counting towards maxEntriesPerUser
- fixed : Thingy CSV new records not updated with createdById and dateCreated and ipAddress
- added : Thingy fields can now be set as unique and checked upon insert
- added : Thingy max entries of thingy records added
7.10.12
- fixed #12072: Product, related and accessory assets

View file

@ -32,10 +32,31 @@ my $session = start(); # this line required
# upgrade functions go here
addAddonsToAdminConsole($session);
createThingyDBColumns($session);
finish($session); # this line required
#----------------------------------------------------------------------------
# Creates new column in tables for Thingy_fields and Thingy_things
sub createThingyDBColumns {
my $session = shift;
print "\tAdding db. columns Thingy_fields.isUnique and Thingy_things.maxEntriesTotal.." unless $quiet;
# and here's our code
my %tfHash = $session->db->quickHash("show columns from Thingy_fields where Field='isUnique'");
my %ttHash = $session->db->quickHash("show columns from Thingy_things where Field='maxEntriesTotal'");
unless ( $tfHash{'Field'}) { $session->db->write("alter table Thingy_fields add isUnique int(1) default 0"); }
unless ( $ttHash{'Field'}) { $session->db->write("alter table Thingy_things add maxEntriesTotal int default null"); }
print "DONE!\n" unless $quiet;
}
#----------------------------------------------------------------------------
# Describe what our function does
sub addAddonsToAdminConsole {