From 81a015dfac8250cab91a00fc2cf5075058e55915 Mon Sep 17 00:00:00 2001
From: James <james@sourcefabric-DX4840.(none)>
Date: Mon, 17 Sep 2012 17:56:33 -0400
Subject: [PATCH] CC-4460: Differences between upgraded and fresh installed
 Airtime database

- done
---
 install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql b/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql
index 3b6bfbec6..4f5cc398f 100644
--- a/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql
+++ b/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql
@@ -101,6 +101,7 @@ CREATE TABLE cc_webstream (
 	creator_id integer NOT NULL,
 	mtime timestamp(6) without time zone NOT NULL,
 	utime timestamp(6) without time zone NOT NULL,
+	lptime timestamp(6) without time zone,
 	mime character varying(255)
 );
 
@@ -113,10 +114,13 @@ CREATE TABLE cc_webstream_metadata (
 
 ALTER TABLE cc_files
 	DROP COLUMN gunid,
-	ADD COLUMN replay_gain character varying(16),
+	ADD COLUMN replay_gain numeric,
         ADD COLUMN owner_id integer,
 	ALTER COLUMN bpm TYPE integer using airtime_to_int(bpm) /* TYPE change - table: cc_files original: character varying(8) new: integer */;
 
+ALTER TABLE cc_files
+	ADD CONSTRAINT cc_files_owner_fkey FOREIGN KEY (owner_id) REFERENCES cc_subjs(id); 
+
 ALTER TABLE cc_playlistcontents
 	ADD COLUMN block_id integer,
 	ADD COLUMN stream_id integer,