Permalink
Browse files

Revert "Remove the 'ref_count' column from url and tag tables"

This reverts commit bee98f9.

I never intended to commit this to master.
  • Loading branch information...
1 parent bf10b6e commit eb0a0cb6acdc74110773499f1303945c959fa59c Oliver Charles committed Jan 2, 2012
Showing with 3 additions and 7 deletions.
  1. +3 −1 admin/sql/CreateTables.sql
  2. +0 −6 admin/sql/updates/20111212-remove-ref-count.sql
@@ -1089,7 +1089,8 @@ CREATE TABLE statistic
CREATE TABLE tag
(
id SERIAL,
- name VARCHAR(255) NOT NULL
+ name VARCHAR(255) NOT NULL,
+ ref_count INTEGER NOT NULL DEFAULT 0
);
CREATE TABLE tag_relation
@@ -1147,6 +1148,7 @@ CREATE TABLE url
gid UUID NOT NULL,
url TEXT NOT NULL,
description TEXT,
+ ref_count INTEGER NOT NULL DEFAULT 0,
edits_pending INTEGER NOT NULL DEFAULT 0 CHECK (edits_pending >= 0),
last_updated TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
@@ -1,6 +0,0 @@
-BEGIN;
-
-ALTER TABLE tag DROP COLUMN ref_count;
-ALTER TABLE url DROP COLUMN ref_count;
-
-COMMIT;

0 comments on commit eb0a0cb

Please sign in to comment.