Skip to content

Commit 27fee5d

Browse files
authored
chore: adds dates | NPG-000 (#769)
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. Fixes # (issue) _if applicable_ ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Test A - [ ] Test B **Test Configuration**: _if applicable_ - Firmware version: - Hardware: - Toolchain: - SDK: **List of new dependencies**: _if applicable_ Provide a list of newly added dependencies in this PR, with the description of what are they doing and why do we need them. - Crate A: description - Crate B: description ## Checklist - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
1 parent 1bdacb3 commit 27fee5d

File tree

3 files changed

+54
-37
lines changed

3 files changed

+54
-37
lines changed

containers/event-db-migrations/Earthfile

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,37 @@ package:
2020
WORKDIR /eventdb
2121

2222
# Add psql
23-
RUN apt-get update && apt-get install -y --no-install-recommends \
24-
wget \
25-
gnupg2 \
26-
ca-certificates \
27-
lsb-release \
28-
apt-transport-https \
29-
&& rm -rf /var/lib/apt/lists/* && \
30-
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
31-
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
32-
apt-get update && \
33-
apt-get install -y --no-install-recommends postgresql-14 && \
34-
apt-get remove -y wget gnupg2 lsb-release apt-transport-https && \
35-
apt-get autoremove -y && \
36-
apt-get clean && rm -rf /var/lib/apt/lists/*
23+
RUN apt-get update && \
24+
# Install dependencies needed for adding the key and postgres
25+
apt-get install -y --no-install-recommends \
26+
wget \
27+
gnupg2 \
28+
ca-certificates \
29+
lsb-release \
30+
apt-transport-https && \
31+
\
32+
# Create the keyring directory
33+
install -m 0755 -d /etc/apt/keyrings && \
34+
\
35+
# Download, de-armor, and save the PostgreSQL key
36+
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
37+
gpg --dearmor -o /etc/apt/keyrings/postgresql.gpg && \
38+
\
39+
# Set permissions for the key
40+
chmod 644 /etc/apt/keyrings/postgresql.gpg && \
41+
\
42+
# Create the sources list, pointing to the key
43+
echo "deb [signed-by=/etc/apt/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
44+
\
45+
# Update apt and install postgresql
46+
apt-get update && \
47+
apt-get install -y --no-install-recommends postgresql-14 && \
48+
\
49+
# Clean up
50+
apt-get remove -y wget gnupg2 lsb-release apt-transport-https && \
51+
apt-get autoremove -y && \
52+
apt-get clean && \
53+
rm -rf /var/lib/apt/lists/*
3754

3855
# Add refinery
3956
COPY +build/refinery .
@@ -55,7 +72,7 @@ package:
5572

5673
ENTRYPOINT ["./entry.sh"]
5774
SAVE IMAGE migrations:$tag
58-
75+
5976
# TODO: Enable this when CI supports passing -P dynamically
6077
# test:
6178
# FROM earthly/dind:alpine

src/event-db/stage_data/dev/00001_fund14_event.sql renamed to src/event-db/stage_data/dev/00001_fund15_event.sql

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- F14
1+
-- F15
22
INSERT INTO event (
33
row_id,
44
name,
@@ -26,25 +26,25 @@ INSERT INTO event (
2626
extra,
2727
cast_to
2828
) VALUES (
29-
14,
30-
'Fund 14',
31-
'Catalyst Testnet - Fund 14',
32-
'2025-09-06 21:45:00', -- Registration Snapshot Time
33-
'2025-09-06 22:00:00', -- Snapshot Start.
29+
15,
30+
'Fund 15',
31+
'Catalyst Testnet - Fund 15',
32+
'2025-11-10 10:00:00', -- Registration Snapshot Time
33+
'2025-11-10 10:15:00', -- Snapshot Start.
3434
25000000, -- Voting Power Threshold
3535
100, -- Max Voting Power PCT
3636
NULL, -- Review Rewards
37-
'2025-07-22 10:00:00', -- Start Time
38-
'2025-10-27 07:00:00', -- End Time
39-
'2025-07-22 10:00:00', -- Insight Sharing Start
40-
'2025-07-22 10:00:00', -- Proposal Submission Start
41-
'2025-07-22 10:00:00', -- Refine Proposals Start
42-
'2025-07-22 10:00:00', -- Finalize Proposals Start
43-
'2025-07-22 10:00:00', -- Proposal Assessment Start
44-
'2025-07-22 10:00:00', -- Assessment QA Start
45-
'2025-09-22 12:00:00', -- Voting Starts
46-
'2025-10-06 11:00:00', -- Voting Ends
47-
'2025-10-27 07:00:00', -- Tallying Ends
37+
'2025-11-10 10:00:00', -- Start Time
38+
'2026-02-15 07:00:00', -- End Time
39+
'2025-11-10 10:00:00', -- Insight Sharing Start
40+
'2025-11-10 10:00:00', -- Proposal Submission Start
41+
'2025-11-10 10:00:00', -- Refine Proposals Start
42+
'2025-11-10 10:00:00', -- Finalize Proposals Start
43+
'2025-11-10 10:00:00', -- Proposal Assessment Start
44+
'2025-11-10 10:00:00', -- Assessment QA Start
45+
'2025-11-10 10:00:00', -- Voting Starts
46+
'2026-01-25 11:00:00', -- Voting Ends
47+
'2026-02-15 07:00:00', -- Tallying Ends
4848
NULL, -- Block 0 Data
4949
NULL, -- Block 0 Hash
5050
1, -- Committee Size

src/event-db/stage_data/dev/00002_fund14_params.sql renamed to src/event-db/stage_data/dev/00002_fund15_params.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
-- Define F14 IdeaScale parameters.
1+
-- Define F15 IdeaScale parameters.
22
INSERT INTO config (id, id2, id3, value) VALUES (
33
'ideascale',
4-
'14',
4+
'15',
55
'',
66
'{
77
"group_id": 31051,
@@ -51,11 +51,11 @@ INSERT INTO config (id, id2, id3, value) VALUES (
5151
) ON CONFLICT (id, id2, id3) DO UPDATE
5252
SET value = EXCLUDED.value;
5353

54-
-- Use F14 params for event with row_id = 14.
54+
-- Use F15 params for event with row_id = 15.
5555
INSERT INTO config (id, id2, id3, value) VALUES (
5656
'event',
5757
'ideascale_params',
58-
'14',
59-
'{"params_id": "F14"}'
58+
'15',
59+
'{"params_id": "F15"}'
6060
) ON CONFLICT (id, id2, id3) DO UPDATE
6161
SET value = EXCLUDED.value;

0 commit comments

Comments
 (0)