Skip to content

Commit 0d739db

Browse files
AndriiMyskovitalie
authored and
vitalie
committed
Securely signed releases PRD (#269)
1 parent 765d9b6 commit 0d739db

File tree

3 files changed

+76
-1
lines changed

3 files changed

+76
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class CreateCustomKeysTable < ActiveRecord::Migration[5.2]
2+
def self.up
3+
create_table :custom_keys do |t|
4+
t.integer :owner_id
5+
t.string :owner_type
6+
t.string :name
7+
t.string :private_key
8+
t.string :public_key
9+
t.string :fingerprint
10+
t.text :description
11+
t.integer :added_by
12+
t.timestamp :created_at
13+
t.timestamp :updated_at
14+
end
15+
end
16+
17+
def self.down
18+
drop_table :custom_keys
19+
end
20+
end

db/main/structure.sql

+55-1
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,44 @@ CREATE SEQUENCE public.crons_id_seq
13741374
ALTER SEQUENCE public.crons_id_seq OWNED BY public.crons.id;
13751375

13761376

1377+
--
1378+
-- Name: custom_keys; Type: TABLE; Schema: public; Owner: -
1379+
--
1380+
1381+
CREATE TABLE public.custom_keys (
1382+
id integer NOT NULL,
1383+
owner_id integer NOT NULL,
1384+
owner_type character varying,
1385+
name character varying,
1386+
private_key character varying,
1387+
public_key character varying,
1388+
fingerprint character varying,
1389+
description text,
1390+
added_by integer,
1391+
created_at timestamp without time zone NOT NULL,
1392+
updated_at timestamp without time zone NOT NULL
1393+
);
1394+
1395+
1396+
--
1397+
-- Name: custom_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1398+
--
1399+
1400+
CREATE SEQUENCE public.custom_keys_id_seq
1401+
START WITH 1
1402+
INCREMENT BY 1
1403+
NO MINVALUE
1404+
NO MAXVALUE
1405+
CACHE 1;
1406+
1407+
1408+
--
1409+
-- Name: custom_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1410+
--
1411+
1412+
ALTER SEQUENCE public.custom_keys_id_seq OWNED BY public.custom_keys.id;
1413+
1414+
13771415
--
13781416
-- Name: deleted_build_configs; Type: TABLE; Schema: public; Owner: -
13791417
--
@@ -3140,6 +3178,13 @@ ALTER TABLE ONLY public.coupons ALTER COLUMN id SET DEFAULT nextval('public.coup
31403178
ALTER TABLE ONLY public.crons ALTER COLUMN id SET DEFAULT nextval('public.crons_id_seq'::regclass);
31413179

31423180

3181+
--
3182+
-- Name: custom_keys id; Type: DEFAULT; Schema: public; Owner: -
3183+
--
3184+
3185+
ALTER TABLE ONLY public.custom_keys ALTER COLUMN id SET DEFAULT nextval('public.custom_keys_id_seq'::regclass);
3186+
3187+
31433188
--
31443189
-- Name: email_unsubscribes id; Type: DEFAULT; Schema: public; Owner: -
31453190
--
@@ -3490,6 +3535,14 @@ ALTER TABLE ONLY public.crons
34903535
ADD CONSTRAINT crons_pkey PRIMARY KEY (id);
34913536

34923537

3538+
--
3539+
-- Name: custom_keys custom_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
3540+
--
3541+
3542+
ALTER TABLE ONLY public.custom_keys
3543+
ADD CONSTRAINT custom_keys_pkey PRIMARY KEY (id);
3544+
3545+
34933546
--
34943547
-- Name: email_unsubscribes email_unsubscribes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
34953548
--
@@ -5909,6 +5962,7 @@ INSERT INTO "schema_migrations" (version) VALUES
59095962
('20210203143406'),
59105963
('20210614140633'),
59115964
('20220621151453'),
5912-
('20220722162400');
5965+
('20220722162400'),
5966+
('20220825140522');
59135967

59145968

spec/travis_migrations_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
commits
2222
coupons
2323
crons
24+
custom_keys
2425
deleted_builds
2526
deleted_stages
2627
deleted_jobs

0 commit comments

Comments
 (0)