app/relations/.keep
app/relations/.keep
This is a binary file and will not be displayed.
+9
app/relations/teams.rb
+9
app/relations/teams.rb
app/repos/.keep
app/repos/.keep
This is a binary file and will not be displayed.
+8
app/repos/team_repo.rb
+8
app/repos/team_repo.rb
config/db/migrate/.keep
config/db/migrate/.keep
This is a binary file and will not be displayed.
+21
config/db/migrate/20251019150215_create_teams.rb
+21
config/db/migrate/20251019150215_create_teams.rb
···
1
+
# frozen_string_literal: true
2
+
3
+
ROM::SQL.migration do
4
+
# Add your migration here.
5
+
#
6
+
# See https://guides.hanamirb.org/v2.2/database/migrations/ for details.
7
+
change do
8
+
create_table :teams do
9
+
column :id, String, primary_key: true
10
+
11
+
column :name, String, null: false
12
+
column :sparklebot_id, String, null: false
13
+
column :active, TrueClass, null: false, default: true
14
+
15
+
column :access_token, String, null: false
16
+
17
+
column :created_at, "timestamptz", null: false
18
+
column :updated_at, "timestamptz", null: false
19
+
end
20
+
end
21
+
end
+75
config/db/structure.sql
+75
config/db/structure.sql
···
1
+
--
2
+
-- PostgreSQL database dump
3
+
--
4
+
5
+
\restrict b9avj9S7ECUvDnNKr6cLCnAOE5wda1QazNR1lr9pRJRZdr9rBPGUpygtbrcRpQq
6
+
7
+
-- Dumped from database version 18.0 (Postgres.app)
8
+
-- Dumped by pg_dump version 18.0 (Postgres.app)
9
+
10
+
SET statement_timeout = 0;
11
+
SET lock_timeout = 0;
12
+
SET idle_in_transaction_session_timeout = 0;
13
+
SET transaction_timeout = 0;
14
+
SET client_encoding = 'UTF8';
15
+
SET standard_conforming_strings = on;
16
+
SELECT pg_catalog.set_config('search_path', '', false);
17
+
SET check_function_bodies = false;
18
+
SET xmloption = content;
19
+
SET client_min_messages = warning;
20
+
SET row_security = off;
21
+
22
+
SET default_tablespace = '';
23
+
24
+
SET default_table_access_method = heap;
25
+
26
+
--
27
+
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
28
+
--
29
+
30
+
CREATE TABLE public.schema_migrations (
31
+
filename text NOT NULL
32
+
);
33
+
34
+
35
+
--
36
+
-- Name: teams; Type: TABLE; Schema: public; Owner: -
37
+
--
38
+
39
+
CREATE TABLE public.teams (
40
+
id text NOT NULL,
41
+
name text NOT NULL,
42
+
sparklebot_id text NOT NULL,
43
+
active boolean DEFAULT true NOT NULL,
44
+
access_token text NOT NULL,
45
+
created_at timestamp with time zone NOT NULL,
46
+
updated_at timestamp with time zone NOT NULL
47
+
);
48
+
49
+
50
+
--
51
+
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
52
+
--
53
+
54
+
ALTER TABLE ONLY public.schema_migrations
55
+
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (filename);
56
+
57
+
58
+
--
59
+
-- Name: teams teams_pkey; Type: CONSTRAINT; Schema: public; Owner: -
60
+
--
61
+
62
+
ALTER TABLE ONLY public.teams
63
+
ADD CONSTRAINT teams_pkey PRIMARY KEY (id);
64
+
65
+
66
+
--
67
+
-- PostgreSQL database dump complete
68
+
--
69
+
70
+
\unrestrict b9avj9S7ECUvDnNKr6cLCnAOE5wda1QazNR1lr9pRJRZdr9rBPGUpygtbrcRpQq
71
+
72
+
SET search_path TO "$user", public;
73
+
74
+
INSERT INTO schema_migrations (filename) VALUES
75
+
('20251019150215_create_teams.rb');