update new xt style
authorGreg Pazo <gpazo@xtuple.com>
Fri, 11 Apr 2014 19:42:47 +0000 (15:42 -0400)
committerGreg Pazo <gpazo@xtuple.com>
Fri, 11 Apr 2014 19:42:47 +0000 (15:42 -0400)
foundation-database/public/tables/location.sql [new file with mode: 0644]

diff --git a/foundation-database/public/tables/location.sql b/foundation-database/public/tables/location.sql
new file mode 100644 (file)
index 0000000..5fc9557
--- /dev/null
@@ -0,0 +1,10 @@
+--ALTER TABLE location ADD COLUMN location_formatname TEXT;
+--CREATE INDEX location_location_formatname_idx on location using btree (location_formatname);
+
+--UPDATE location SET location_formatname=formatLocationName(location_id);
+
+
+select xt.add_column('location','location_formatname', 'TEXT', NULL, 'public');
+select xt.add_index('location', 'location_formatname','location_location_formatname_idx', 'btree', 'public');
+UPDATE location SET location_formatname=formatLocationName(location_id) WHERE location_formatname IS NULL;
+