M db/migrate/20120826180414_create_pastes.rb +1 -1
@@ 1,5 1,5 @@ 
 # Create basic table.
-class CreatePastes < ActiveRecord::Migration
+class CreatePastes < ActiveRecord::Migration[4.2]
   def change
     create_table :pastes do |t|
       t.string :ip, :null => false

          
M db/migrate/20120826182012_change_column_name_to_conform_ar.rb +1 -1
@@ 1,5 1,5 @@ 
 # Hash shouldn't be used as column name.
-class ChangeColumnNameToConformAr < ActiveRecord::Migration
+class ChangeColumnNameToConformAr < ActiveRecord::Migration[4.2]
   def change
     rename_column :pastes, :hash, :paste_hash
   end

          
M db/migrate/20120905072325_set_limit_on_paste.rb +1 -1
@@ 1,5 1,5 @@ 
 # Reduced size as needed.
-class SetLimitOnPaste < ActiveRecord::Migration
+class SetLimitOnPaste < ActiveRecord::Migration[4.2]
   def change
     change_table :pastes do |t|
       t.change :ip, :string, :limit => 50

          
M db/migrate/20120905074204_return_not_null_to_paste.rb +1 -1
@@ 1,5 1,5 @@ 
 # Add constraints.
-class ReturnNotNullToPaste < ActiveRecord::Migration
+class ReturnNotNullToPaste < ActiveRecord::Migration[4.2]
   def change
     change_table :pastes do |t|
       t.change :ip, :string, :limit => 50, :null => false

          
M db/migrate/20130201150322_add_key_to_paste.rb +1 -1
@@ 1,5 1,5 @@ 
 # For deletion.
-class AddKeyToPaste < ActiveRecord::Migration
+class AddKeyToPaste < ActiveRecord::Migration[4.2]
   def change
     add_column :pastes, :key, :string
   end

          
M db/migrate/20130511133450_add_secret_to_pastes.rb +1 -1
@@ 1,5 1,5 @@ 
 # Private paste column.
-class AddSecretToPastes < ActiveRecord::Migration
+class AddSecretToPastes < ActiveRecord::Migration[4.2]
   def change
     add_column :pastes, :secret, :string
   end

          
M db/migrate/20130512032335_add_index_to_pastes_secret.rb +1 -1
@@ 1,5 1,5 @@ 
 # Speed up lookup.
-class AddIndexToPastesSecret < ActiveRecord::Migration
+class AddIndexToPastesSecret < ActiveRecord::Migration[4.2]
   def change
     add_index :pastes, :secret
   end

          
M db/migrate/20150914054154_add_language_to_paste.rb +1 -1
@@ 1,4 1,4 @@ 
-class AddLanguageToPaste < ActiveRecord::Migration
+class AddLanguageToPaste < ActiveRecord::Migration[4.2]
   def change
     add_column :pastes, :language, :string
   end

          
M db/migrate/20150916161622_strict_character_lengths.rb +1 -1
@@ 1,4 1,4 @@ 
-class StrictCharacterLengths < ActiveRecord::Migration
+class StrictCharacterLengths < ActiveRecord::Migration[4.2]
   def change
     change_table :pastes do |t|
       t.change :key, :string, :limit => 100

          
M db/structure.sql +4 -32
@@ 8,34 8,6 @@ SET check_function_bodies = false;
 SET client_min_messages = warning;
 SET row_security = off;
 
---
--- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
---
-
-CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
-
-
---
--- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
---
-
-COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
-
-
---
--- Name: hstore; Type: EXTENSION; Schema: -; Owner: -
---
-
-CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public;
-
-
---
--- Name: EXTENSION hstore; Type: COMMENT; Schema: -; Owner: -
---
-
-COMMENT ON EXTENSION hstore IS 'data type for storing sets of (key, value) pairs';
-
-
 SET default_tablespace = '';
 
 SET default_with_oids = false;

          
@@ 61,8 33,8 @@ CREATE TABLE public.pastes (
     ip character varying(50) NOT NULL,
     paste text NOT NULL,
     paste_hash character varying(150) NOT NULL,
-    created_at timestamp with time zone NOT NULL,
-    updated_at timestamp with time zone NOT NULL,
+    created_at timestamp with time zone,
+    updated_at timestamp with time zone,
     key character varying(100),
     secret character varying(100),
     language character varying(100)

          
@@ 130,10 102,10 @@ ALTER TABLE ONLY public.schema_migration
 
 
 --
--- Name: index_pastes_on_ip_and_hash; Type: INDEX; Schema: public; Owner: -
+-- Name: index_pastes_on_ip_and_paste_hash; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_pastes_on_ip_and_hash ON public.pastes USING btree (ip, paste_hash);
+CREATE UNIQUE INDEX index_pastes_on_ip_and_paste_hash ON public.pastes USING btree (ip, paste_hash);
 
 
 --