From e097cac210a9f4189d3308fc8475e8f420487e1c Mon Sep 17 00:00:00 2001 From: Martin Lensment Date: Tue, 14 Jul 2015 14:04:26 +0300 Subject: [PATCH] Update schema --- db/schema-read-only.rb | 14 +++++----- db/structure.sql | 61 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 66 insertions(+), 9 deletions(-) diff --git a/db/schema-read-only.rb b/db/schema-read-only.rb index 9859d8a1d..d835c73c7 100644 --- a/db/schema-read-only.rb +++ b/db/schema-read-only.rb @@ -936,14 +936,14 @@ ActiveRecord::Schema.define(version: 20150713113436) do end create_table "que_jobs", id: false, force: :cascade do |t| - t.integer "priority", limit: 2, default: 100, null: false - t.datetime "run_at", default: '2015-06-30 14:16:50', null: false - t.integer "job_id", limit: 8, default: 0, null: false - t.text "job_class", null: false - t.json "args", default: [], null: false - t.integer "error_count", default: 0, null: false + t.integer "priority", limit: 2, default: 100, null: false + t.datetime "run_at", default: "now()", null: false + t.integer "job_id", limit: 8, default: "nextval('que_jobs_job_id_seq'::regclass)", null: false + t.text "job_class", null: false + t.json "args", default: [], null: false + t.integer "error_count", default: 0, null: false t.text "last_error" - t.text "queue", default: "", null: false + t.text "queue", default: "", null: false end create_table "registrant_verifications", force: :cascade do |t| diff --git a/db/structure.sql b/db/structure.sql index f16eada5e..dd524fc00 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -2421,8 +2421,8 @@ ALTER SEQUENCE pricelists_id_seq OWNED BY pricelists.id; CREATE TABLE que_jobs ( priority smallint DEFAULT 100 NOT NULL, - run_at timestamp without time zone DEFAULT '2015-06-30 14:16:50.905537'::timestamp without time zone NOT NULL, - job_id bigint DEFAULT 0 NOT NULL, + run_at timestamp with time zone DEFAULT now() NOT NULL, + job_id bigint NOT NULL, job_class text NOT NULL, args json DEFAULT '[]'::json NOT NULL, error_count integer DEFAULT 0 NOT NULL, @@ -2431,6 +2431,32 @@ CREATE TABLE que_jobs ( ); +-- +-- Name: TABLE que_jobs; Type: COMMENT; Schema: public; Owner: - +-- + +COMMENT ON TABLE que_jobs IS '3'; + + +-- +-- Name: que_jobs_job_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE que_jobs_job_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: que_jobs_job_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE que_jobs_job_id_seq OWNED BY que_jobs.job_id; + + -- -- Name: registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace: -- @@ -3186,6 +3212,13 @@ ALTER TABLE ONLY people ALTER COLUMN id SET DEFAULT nextval('people_id_seq'::reg ALTER TABLE ONLY pricelists ALTER COLUMN id SET DEFAULT nextval('pricelists_id_seq'::regclass); +-- +-- Name: job_id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY que_jobs ALTER COLUMN job_id SET DEFAULT nextval('que_jobs_job_id_seq'::regclass); + + -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- @@ -3705,6 +3738,14 @@ ALTER TABLE ONLY pricelists ADD CONSTRAINT pricelists_pkey PRIMARY KEY (id); +-- +-- Name: que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- + +ALTER TABLE ONLY que_jobs + ADD CONSTRAINT que_jobs_pkey PRIMARY KEY (queue, priority, run_at, job_id); + + -- -- Name: registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- @@ -4809,14 +4850,26 @@ INSERT INTO schema_migrations (version) VALUES ('20150520164507'); INSERT INTO schema_migrations (version) VALUES ('20150521120145'); +INSERT INTO schema_migrations (version) VALUES ('20150522164020'); + +INSERT INTO schema_migrations (version) VALUES ('20150525075550'); + +INSERT INTO schema_migrations (version) VALUES ('20150601083516'); + +INSERT INTO schema_migrations (version) VALUES ('20150601083800'); + INSERT INTO schema_migrations (version) VALUES ('20150603141549'); INSERT INTO schema_migrations (version) VALUES ('20150603211318'); INSERT INTO schema_migrations (version) VALUES ('20150603212659'); +INSERT INTO schema_migrations (version) VALUES ('20150609093515'); + INSERT INTO schema_migrations (version) VALUES ('20150609103333'); +INSERT INTO schema_migrations (version) VALUES ('20150610111019'); + INSERT INTO schema_migrations (version) VALUES ('20150610112238'); INSERT INTO schema_migrations (version) VALUES ('20150610144547'); @@ -4825,8 +4878,12 @@ INSERT INTO schema_migrations (version) VALUES ('20150611124920'); INSERT INTO schema_migrations (version) VALUES ('20150612123111'); +INSERT INTO schema_migrations (version) VALUES ('20150612125720'); + INSERT INTO schema_migrations (version) VALUES ('20150701074344'); +INSERT INTO schema_migrations (version) VALUES ('20150703084206'); + INSERT INTO schema_migrations (version) VALUES ('20150703084632'); INSERT INTO schema_migrations (version) VALUES ('20150706091724');