more work on post uploads

This commit is contained in:
albert
2010-03-12 19:27:54 -05:00
parent 9eb578927c
commit ca8be10ab9
18 changed files with 218 additions and 168 deletions

View File

@@ -1324,8 +1324,6 @@ ALTER SEQUENCE unapprovals_id_seq OWNED BY unapprovals.id;
CREATE TABLE uploads (
id integer NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
source character varying(255),
file_path character varying(255),
content_type character varying(255),
@@ -1334,7 +1332,10 @@ CREATE TABLE uploads (
uploader_ip_addr inet NOT NULL,
tag_string text NOT NULL,
status character varying(255) DEFAULT 'pending'::character varying NOT NULL,
post_id integer
post_id integer,
md5_confirmation character varying(255),
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -1419,7 +1420,8 @@ CREATE TABLE users (
always_resize_images boolean DEFAULT false NOT NULL,
default_image_size character varying(255) DEFAULT 'medium'::character varying NOT NULL,
favorite_tags text,
blacklisted_tags text
blacklisted_tags text,
time_zone character varying(255) DEFAULT 'Eastern Time (US & Canada)'::character varying NOT NULL
);

View File

@@ -28,6 +28,7 @@ class CreateUsers < ActiveRecord::Migration
t.column :default_image_size, :string, :null => false, :default => "medium"
t.column :favorite_tags, :text
t.column :blacklisted_tags, :text
t.column :time_zone, :string, :null => false, :default => "Eastern Time (US & Canada)"
end
execute "CREATE UNIQUE INDEX index_users_on_name ON users ((lower(name)))"

View File

@@ -1,17 +1,17 @@
class CreateUploads < ActiveRecord::Migration
def self.up
create_table :uploads do |t|
t.timestamps
t.column :source, :string
t.column :file_path, :string
t.column :content_type, :string
t.column :rating, :character, :null => false
t.column :uploader_id, :integer, :null => false
t.column :uploader_ip_addr, "inet", :null => false
t.column :tag_string, :text, :null => false
t.column :status, :string, :null => false, :default => "pending"
t.column :post_id, :integer
t.column :md5_confirmation, :string
t.timestamps
end
end