summaryrefslogtreecommitdiff
path: root/sql/modules/Location.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/modules/Location.sql')
-rw-r--r--sql/modules/Location.sql7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/modules/Location.sql b/sql/modules/Location.sql
index 3986c24f..c0d57b51 100644
--- a/sql/modules/Location.sql
+++ b/sql/modules/Location.sql
@@ -49,11 +49,12 @@ BEGIN
return location_row.id;
END IF;
INSERT INTO location
- (line_one, line_two, line_three, city, state, mail_code, country_id)
+ (line_one, line_two, line_three, city, state, mail_code, country_id,
+ created)
VALUES
(in_address1, in_address2, in_address3, in_city, in_state,
- in_zipcode, in_country);
- SELECT lastval('location_id_seq') INTO location_id;
+ in_zipcode, in_country, now());
+ SELECT currval('location_id_seq') INTO location_id;
return location_id;
END;
$$ LANGUAGE PLPGSQL;