Merge branch 'embedded-notes'

This commit is contained in:
r888888888
2015-02-02 13:34:10 -08:00
8 changed files with 171 additions and 107 deletions

View File

@@ -4,8 +4,15 @@ Danbooru.Note = {
var $inner_border = $('<div/>');
$inner_border.addClass("note-box-inner-border");
var opacity = 0;
if (Danbooru.Note.embed) {
opacity = 0.95
} else {
opacity = 0.5
}
$inner_border.css({
opacity: 0.5,
opacity: opacity,
"-ms-filter": "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)",
"filter": "alpha(opacity=50)",
zoom: 1
@@ -13,6 +20,11 @@ Danbooru.Note = {
var $note_box = $('<div/>');
$note_box.addClass("note-box");
if (Danbooru.Note.embed) {
$note_box.addClass("embedded");
}
$note_box.data("id", String(id));
$note_box.attr("data-id", String(id));
$note_box.draggable({
@@ -267,8 +279,11 @@ Danbooru.Note = {
}
},
set_text: function($note_body, text) {
set_text: function($note_body, $note_box, text) {
Danbooru.Note.Body.display_text($note_body, text);
if (Danbooru.Note.embed) {
Danbooru.Note.Body.display_text($note_box.children("div"), text);
}
Danbooru.Note.Body.resize($note_body);
Danbooru.Note.Body.bound_position($note_body);
},
@@ -321,6 +336,10 @@ Danbooru.Note = {
$(".note-box").resizable("disable");
$(".note-box").draggable("disable");
if (Danbooru.Note.embed) {
$(".note-box").css("opacity", "0.5");
}
$textarea = $('<textarea></textarea>');
$textarea.css({
width: "97%",
@@ -362,6 +381,10 @@ Danbooru.Note = {
Danbooru.Note.editing = false;
$(".note-box").resizable("enable");
$(".note-box").draggable("enable");
if (Danbooru.Note.embed) {
$(".note-box").css("opacity", "0.95");
}
});
$textarea.selectEnd();
@@ -416,9 +439,9 @@ Danbooru.Note = {
var $note_box = Danbooru.Note.Box.find(id);
var text = $textarea.val();
$note_body.data("original-body", text);
Danbooru.Note.Body.set_text($note_body, "Loading...");
Danbooru.Note.Body.set_text($note_body, $note_box, "Loading...");
$.get("/note_previews.json", {body: text}).success(function(data) {
Danbooru.Note.Body.set_text($note_body, data.body);
Danbooru.Note.Body.set_text($note_body, $note_box, data.body);
$note_body.show();
});
$this.dialog("close");
@@ -448,9 +471,9 @@ Danbooru.Note = {
var text = $textarea.val();
var $note_box = Danbooru.Note.Box.find(id);
$note_box.find(".note-box-inner-border").addClass("unsaved");
Danbooru.Note.Body.set_text($note_body, "Loading...");
Danbooru.Note.Body.set_text($note_body, $note_box, "Loading...");
$.get("/note_previews.json", {body: text}).success(function(data) {
Danbooru.Note.Body.set_text($note_body, data.body);
Danbooru.Note.Body.set_text($note_body, $note_box, data.body);
$note_body.show();
});
},
@@ -662,6 +685,9 @@ Danbooru.Note = {
$note_body.data("original-body", text);
Danbooru.Note.Box.scale($note_box);
Danbooru.Note.Body.display_text($note_body, text);
if (Danbooru.Note.embed) {
Danbooru.Note.Body.display_text($note_box.children("div"), text);
}
},
create: function(x, y, w, h) {
@@ -713,6 +739,7 @@ $(function() {
$("#translate").bind("click", Danbooru.Note.TranslationMode.toggle);
$(document).bind("keypress", "n", Danbooru.Note.TranslationMode.toggle);
}
Danbooru.Note.embed = (Danbooru.meta("post-has-embedded-notes") === "true");
Danbooru.Note.load_all();
$("#image").bind("click", Danbooru.Note.Box.toggle_all);
}

View File

@@ -71,6 +71,11 @@ div#note-container {
border: 1px solid red;
}
}
div.note-box.embedded div.note-box-inner-border {
text-align: center;
word-wrap: break-word;
}
}
div#note-preview {

View File

@@ -3,6 +3,10 @@ class Post < ActiveRecord::Base
class DisapprovalError < Exception ; end
class SearchError < Exception ; end
BOOLEAN_ATTRIBUTES = {
:has_embedded_notes => 0x0001
}
attr_accessor :old_tag_string, :old_parent_id, :old_source, :old_rating, :has_constraints, :disable_versioning
after_destroy :delete_files
after_destroy :delete_remote_files
@@ -38,7 +42,7 @@ class Post < ActiveRecord::Base
has_many :favorites, :dependent => :destroy
validates_uniqueness_of :md5
validate :post_is_not_its_own_parent
attr_accessible :source, :rating, :tag_string, :old_tag_string, :old_parent_id, :old_source, :old_rating, :last_noted_at, :parent_id, :as => [:member, :builder, :gold, :platinum, :contributor, :janitor, :moderator, :admin, :default]
attr_accessible :source, :rating, :tag_string, :old_tag_string, :old_parent_id, :old_source, :old_rating, :last_noted_at, :parent_id, :has_embedded_notes, :as => [:member, :builder, :gold, :platinum, :contributor, :janitor, :moderator, :admin, :default]
attr_accessible :is_rating_locked, :is_note_locked, :as => [:builder, :contributor, :janitor, :moderator, :admin]
attr_accessible :is_status_locked, :as => [:admin]
@@ -1486,6 +1490,24 @@ class Post < ActiveRecord::Base
include PixivMethods
include IqdbMethods
BOOLEAN_ATTRIBUTES.each do |boolean_attribute, bit_flag|
define_method(boolean_attribute) do
bit_flags & bit_flag > 0
end
define_method("#{boolean_attribute}?") do
bit_flags & bit_flag > 0
end
define_method("#{boolean_attribute}=") do |val|
if val.to_s =~ /t|1|y/
self.bit_flags |= bit_flag
else
self.bit_flags &= ~bit_flag
end
end
end
def visible?
return false if !Danbooru.config.can_user_see_post?(CurrentUser.user, self)
return false if CurrentUser.safe_mode? && rating != "s"

View File

@@ -33,6 +33,11 @@
<% end %>
</div>
<div class="input">
<%= f.label :has_embedded_notes, "Embed notes" %>
<%= f.check_box :has_embedded_notes %>
</div>
<% if CurrentUser.is_builder? %>
<div class="input">
<%= f.label :blank, "Lock" %>

View File

@@ -120,6 +120,7 @@
<meta name="post-is-deleted" content="<%= @post.is_deleted? %>">
<meta name="post-is-flagged" content="<%= @post.is_flagged? %>">
<meta name="config-large-width" content="<%= Danbooru.config.large_image_width %>">
<meta name="post-has-embedded-notes" content="<%= @post.has_embedded_notes? %>">
<meta name="always-resize-images" content="<%= CurrentUser.user.always_resize_images? %>">
<meta property="og:title" content="<%= @post.presenter.humanized_essential_tag_string %> - <%= Danbooru.config.app_name %>">
<meta property="og:description" content="<%= @post.presenter.humanized_tag_string %>">

View File

@@ -1,3 +1,4 @@
set :keep_releases, 10
set :stages, %w(production development staging)
set :default_stage, "staging"
set :unicorn_env, defer {stage}
@@ -163,3 +164,4 @@ after "deploy:update", "unicorn:restart"
after "deploy:update", "deploy:precompile_assets"
after "deploy:update", "deploy:web:enable"
after "delayed_job:stop", "delayed_job:kill"
after "deploy:update", "deploy:cleanup"

View File

@@ -0,0 +1,6 @@
class AddBitFlagsToPosts < ActiveRecord::Migration
def change
execute "set statement_timeout = 0"
add_column :posts, :bit_flags, "bigint", :null => false, :default => 0
end
end

View File

@@ -3,6 +3,7 @@
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
@@ -421,8 +422,8 @@ CREATE TABLE advertisement_hits (
id integer NOT NULL,
advertisement_id integer NOT NULL,
ip_addr inet NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -459,8 +460,8 @@ CREATE TABLE advertisements (
height integer NOT NULL,
file_name character varying(255) NOT NULL,
is_work_safe boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -490,8 +491,8 @@ ALTER SEQUENCE advertisements_id_seq OWNED BY advertisements.id;
CREATE TABLE amazon_backups (
id integer NOT NULL,
last_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -557,8 +558,8 @@ CREATE TABLE artist_commentaries (
original_description text,
translated_title text,
translated_description text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -594,8 +595,8 @@ CREATE TABLE artist_commentary_versions (
original_description text,
translated_title text,
translated_description text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -627,8 +628,8 @@ CREATE TABLE artist_urls (
artist_id integer NOT NULL,
url text NOT NULL,
normalized_url text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -666,8 +667,9 @@ CREATE TABLE artist_versions (
group_name character varying(255),
url_string text,
is_banned boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone,
normalized_url_string text
);
@@ -703,8 +705,8 @@ CREATE TABLE artists (
other_names text,
other_names_index tsvector,
group_name character varying(255),
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -737,8 +739,8 @@ CREATE TABLE bans (
reason text NOT NULL,
banner_id integer NOT NULL,
expires_at timestamp without time zone NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -804,8 +806,8 @@ CREATE TABLE comment_votes (
comment_id integer NOT NULL,
user_id integer NOT NULL,
score integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -840,8 +842,8 @@ CREATE TABLE comments (
ip_addr inet NOT NULL,
body_index tsvector NOT NULL,
score integer DEFAULT 0 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
updater_id integer,
updater_ip_addr inet,
do_not_bump_post boolean DEFAULT false NOT NULL
@@ -881,8 +883,8 @@ CREATE TABLE delayed_jobs (
locked_at timestamp without time zone,
failed_at timestamp without time zone,
locked_by character varying(255),
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
queue character varying(255)
);
@@ -952,8 +954,8 @@ CREATE TABLE dmails (
message_index tsvector NOT NULL,
is_read boolean DEFAULT false NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
creator_ip_addr inet DEFAULT '127.0.0.1'::inet NOT NULL
);
@@ -2019,8 +2021,8 @@ CREATE TABLE forum_posts (
body text NOT NULL,
text_index tsvector NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2122,8 +2124,8 @@ CREATE TABLE forum_topics (
is_locked boolean DEFAULT false NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
text_index tsvector NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
category_id integer DEFAULT 0 NOT NULL
);
@@ -2156,8 +2158,8 @@ CREATE TABLE ip_bans (
creator_id integer NOT NULL,
ip_addr inet NOT NULL,
reason text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2189,8 +2191,8 @@ CREATE TABLE janitor_trials (
creator_id integer NOT NULL,
user_id integer NOT NULL,
original_level integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2221,8 +2223,8 @@ CREATE TABLE key_values (
id integer NOT NULL,
key character varying(255) NOT NULL,
value text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2253,8 +2255,8 @@ CREATE TABLE mod_actions (
id integer NOT NULL,
creator_id integer NOT NULL,
description text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2286,8 +2288,8 @@ CREATE TABLE news_updates (
message text NOT NULL,
creator_id integer NOT NULL,
updater_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2326,8 +2328,8 @@ CREATE TABLE note_versions (
height integer NOT NULL,
is_active boolean DEFAULT true NOT NULL,
body text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
version integer DEFAULT 0 NOT NULL
);
@@ -2366,8 +2368,8 @@ CREATE TABLE notes (
is_active boolean DEFAULT true NOT NULL,
body text NOT NULL,
body_index tsvector NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
version integer DEFAULT 0 NOT NULL
);
@@ -2399,7 +2401,8 @@ CREATE TABLE pixiv_ugoira_frame_data (
id integer NOT NULL,
post_id integer,
data text NOT NULL,
content_type character varying(255) NOT NULL
content_type character varying(255) NOT NULL,
console_log text
);
@@ -2432,8 +2435,8 @@ CREATE TABLE pool_versions (
post_ids text DEFAULT ''::text NOT NULL,
updater_id integer NOT NULL,
updater_ip_addr inet NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
name character varying(255)
);
@@ -2470,8 +2473,8 @@ CREATE TABLE pools (
post_ids text DEFAULT ''::text NOT NULL,
post_count integer DEFAULT 0 NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
category character varying(255) DEFAULT 'series'::character varying NOT NULL
);
@@ -2505,8 +2508,8 @@ CREATE TABLE post_appeals (
creator_id integer NOT NULL,
creator_ip_addr integer NOT NULL,
reason text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2537,8 +2540,8 @@ CREATE TABLE post_disapprovals (
id integer NOT NULL,
user_id integer NOT NULL,
post_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2572,8 +2575,8 @@ CREATE TABLE post_flags (
creator_ip_addr inet NOT NULL,
reason text,
is_resolved boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2602,8 +2605,8 @@ ALTER SEQUENCE post_flags_id_seq OWNED BY post_flags.id;
CREATE TABLE post_versions (
id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
post_id integer NOT NULL,
tags text DEFAULT ''::text NOT NULL,
rating character(1),
@@ -2642,8 +2645,8 @@ CREATE TABLE post_votes (
post_id integer NOT NULL,
user_id integer NOT NULL,
score integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2672,8 +2675,8 @@ ALTER SEQUENCE post_votes_id_seq OWNED BY post_votes.id;
CREATE TABLE posts (
id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
up_score integer DEFAULT 0 NOT NULL,
down_score integer DEFAULT 0 NOT NULL,
score integer DEFAULT 0 NOT NULL,
@@ -2710,7 +2713,8 @@ CREATE TABLE posts (
is_banned boolean DEFAULT false NOT NULL,
pixiv_id integer,
last_commented_at timestamp without time zone,
has_active_children boolean DEFAULT false
has_active_children boolean DEFAULT false,
bit_flags bigint DEFAULT 0 NOT NULL
);
@@ -2788,8 +2792,8 @@ CREATE TABLE tag_aliases (
creator_ip_addr inet NOT NULL,
forum_topic_id integer,
status text DEFAULT 'pending'::text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2825,8 +2829,8 @@ CREATE TABLE tag_implications (
creator_ip_addr inet NOT NULL,
forum_topic_id integer,
status text DEFAULT 'pending'::text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2862,8 +2866,8 @@ CREATE TABLE tag_subscriptions (
is_public boolean DEFAULT true NOT NULL,
last_accessed_at timestamp without time zone,
is_opted_in boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2897,8 +2901,8 @@ CREATE TABLE tags (
category integer DEFAULT 0 NOT NULL,
related_tags text,
related_tags_updated_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
is_locked boolean DEFAULT false NOT NULL
);
@@ -2931,8 +2935,8 @@ CREATE TABLE transaction_log_items (
category character varying(255),
user_id integer,
data text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -2972,8 +2976,8 @@ CREATE TABLE uploads (
backtrace text,
post_id integer,
md5_confirmation character varying(255),
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
server text,
parent_id integer
);
@@ -3008,8 +3012,8 @@ CREATE TABLE user_feedback (
creator_id integer NOT NULL,
category character varying(255) NOT NULL,
body text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -3045,8 +3049,8 @@ CREATE TABLE user_name_change_requests (
desired_name character varying(255),
change_reason text,
rejection_reason text,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -3077,8 +3081,8 @@ CREATE TABLE user_password_reset_nonces (
id integer NOT NULL,
key character varying(255) NOT NULL,
email character varying(255) NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp without time zone,
updated_at timestamp without time zone
);
@@ -3107,8 +3111,8 @@ ALTER SEQUENCE user_password_reset_nonces_id_seq OWNED BY user_password_reset_no
CREATE TABLE users (
id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
name character varying(255) NOT NULL,
password_hash character varying(255) NOT NULL,
email character varying(255),
@@ -3166,8 +3170,8 @@ CREATE TABLE wiki_page_versions (
title character varying(255) NOT NULL,
body text NOT NULL,
is_locked boolean NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
other_names text
);
@@ -3202,8 +3206,8 @@ CREATE TABLE wiki_pages (
body text NOT NULL,
body_index tsvector NOT NULL,
is_locked boolean DEFAULT false NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
updater_id integer,
other_names text,
other_names_index tsvector
@@ -6352,13 +6356,6 @@ CREATE INDEX index_forum_subscriptions_on_user_id ON forum_subscriptions USING b
CREATE INDEX index_forum_topic_visits_on_forum_topic_id ON forum_topic_visits USING btree (forum_topic_id);
--
-- Name: index_forum_topic_visits_on_last_read_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_forum_topic_visits_on_last_read_at ON forum_topic_visits USING btree (last_read_at);
--
-- Name: index_forum_topic_visits_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -6667,13 +6664,6 @@ CREATE INDEX index_posts_on_last_noted_at ON posts USING btree (last_noted_at);
CREATE UNIQUE INDEX index_posts_on_md5 ON posts USING btree (md5);
--
-- Name: index_posts_on_mpixels; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_posts_on_mpixels ON posts USING btree (((((image_width * image_height))::numeric / 1000000.0)));
--
-- Name: index_posts_on_parent_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -7165,9 +7155,15 @@ INSERT INTO schema_migrations (version) VALUES ('20141009231234');
INSERT INTO schema_migrations (version) VALUES ('20141017231608');
INSERT INTO schema_migrations (version) VALUES ('20141028202032');
INSERT INTO schema_migrations (version) VALUES ('20141120045943');
INSERT INTO schema_migrations (version) VALUES ('20141203230229');
INSERT INTO schema_migrations (version) VALUES ('20150119191042');
INSERT INTO schema_migrations (version) VALUES ('20150120005624');
INSERT INTO schema_migrations (version) VALUES ('20150128005954');