Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

last_activity_at for users #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions db/main/migrate/20250206092313_last_activity_at_on_user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class LastActivityAtOnUser < ActiveRecord::Migration[7.0]
def change
add_column :users, :last_activity_at, :timestamp
end
end
34 changes: 10 additions & 24 deletions db/main/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,8 @@ ALTER SEQUENCE public.abuses_id_seq OWNED BY public.abuses.id;
CREATE TABLE public.ar_internal_metadata (
key character varying NOT NULL,
value character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);


Expand Down Expand Up @@ -1835,15 +1835,6 @@ CREATE SEQUENCE public.emails_id_seq
ALTER SEQUENCE public.emails_id_seq OWNED BY public.emails.id;


--
-- Name: enterprise_migrations; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.enterprise_migrations (
version bigint NOT NULL
);


--
-- Name: gatekeeper_workers; Type: TABLE; Schema: public; Owner: -
--
Expand Down Expand Up @@ -3287,7 +3278,8 @@ CREATE TABLE public.users (
vcs_id character varying,
confirmed_at timestamp without time zone,
token_expires_at timestamp without time zone,
confirmation_token character varying
confirmation_token character varying,
last_activity_at timestamp without time zone
);


Expand Down Expand Up @@ -4304,7 +4296,7 @@ CREATE INDEX index_builds_on_repository_id ON public.builds USING btree (reposit
-- Name: index_builds_on_repository_id_and_branch_and_event_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_builds_on_repository_id_and_branch_and_event_type ON public.builds USING btree (repository_id, branch, event_type) WHERE ((state)::text = ANY (ARRAY[('created'::character varying)::text, ('queued'::character varying)::text, ('received'::character varying)::text]));
CREATE INDEX index_builds_on_repository_id_and_branch_and_event_type ON public.builds USING btree (repository_id, branch, event_type) WHERE ((state)::text = ANY ((ARRAY['created'::character varying, 'queued'::character varying, 'received'::character varying])::text[]));


--
Expand Down Expand Up @@ -4346,7 +4338,7 @@ CREATE INDEX index_builds_on_repository_id_event_type_id ON public.builds USING
-- Name: index_builds_on_repository_id_where_state_not_finished; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_builds_on_repository_id_where_state_not_finished ON public.builds USING btree (repository_id) WHERE ((state)::text = ANY (ARRAY[('created'::character varying)::text, ('queued'::character varying)::text, ('received'::character varying)::text, ('started'::character varying)::text]));
CREATE INDEX index_builds_on_repository_id_where_state_not_finished ON public.builds USING btree (repository_id) WHERE ((state)::text = ANY ((ARRAY['created'::character varying, 'queued'::character varying, 'received'::character varying, 'started'::character varying])::text[]));


--
Expand Down Expand Up @@ -4531,13 +4523,6 @@ CREATE INDEX index_emails_on_email ON public.emails USING btree (email);
CREATE INDEX index_emails_on_user_id ON public.emails USING btree (user_id);


--
-- Name: index_enterprise_migrations; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_enterprise_migrations ON public.enterprise_migrations USING btree (version);


--
-- Name: index_errored_jobs_on_repository_id_order_by_newest; Type: INDEX; Schema: public; Owner: -
--
Expand Down Expand Up @@ -4647,7 +4632,7 @@ CREATE INDEX index_jobs_on_owner_id_and_owner_type_and_state ON public.jobs USIN
-- Name: index_jobs_on_owner_where_state_running; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_jobs_on_owner_where_state_running ON public.jobs USING btree (owner_id, owner_type) WHERE ((state)::text = ANY (ARRAY[('queued'::character varying)::text, ('received'::character varying)::text, ('started'::character varying)::text]));
CREATE INDEX index_jobs_on_owner_where_state_running ON public.jobs USING btree (owner_id, owner_type) WHERE ((state)::text = ANY ((ARRAY['queued'::character varying, 'received'::character varying, 'started'::character varying])::text[]));


--
Expand All @@ -4668,7 +4653,7 @@ CREATE INDEX index_jobs_on_repository_id_order_by_newest ON public.jobs USING bt
-- Name: index_jobs_on_repository_id_where_state_running; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_jobs_on_repository_id_where_state_running ON public.jobs USING btree (repository_id) WHERE ((state)::text = ANY (ARRAY[('queued'::character varying)::text, ('received'::character varying)::text, ('started'::character varying)::text]));
CREATE INDEX index_jobs_on_repository_id_where_state_running ON public.jobs USING btree (repository_id) WHERE ((state)::text = ANY ((ARRAY['queued'::character varying, 'received'::character varying, 'started'::character varying])::text[]));


--
Expand Down Expand Up @@ -6371,6 +6356,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20230505060110'),
('20230713115855'),
('20231005111642'),
('20240823085523');
('20240823085523'),
('20250206092313');