diff --git a/db/migrate/20240520124019_add_last_activity_on_to_members.rb b/db/migrate/20240520124019_add_last_activity_on_to_members.rb
new file mode 100644
index 0000000000000000000000000000000000000000..83169ec189f2e375fb44e8dddbdb2df36fd266f1
--- /dev/null
+++ b/db/migrate/20240520124019_add_last_activity_on_to_members.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddLastActivityOnToMembers < Gitlab::Database::Migration[2.2]
+  milestone '17.1'
+
+  def change
+    add_column :members, :last_activity_on, :date, default: -> { 'NOW()' }
+  end
+end
diff --git a/db/schema_migrations/20240520124019 b/db/schema_migrations/20240520124019
new file mode 100644
index 0000000000000000000000000000000000000000..7f00ad6007e4dadc0f927c956bd10dc56ea7604e
--- /dev/null
+++ b/db/schema_migrations/20240520124019
@@ -0,0 +1 @@
+6c9ac26028c46af3afdac93f39230aeed6d056eb7d8d06cd37c4a26d3b124b51
\ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 58cd5684dcc0c5bb12e2ef2494ca25912fd0c9b0..2b17c3b40894ffca30c0272867d0defcc9e8da26 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -11302,6 +11302,7 @@ CREATE TABLE members (
     member_role_id bigint,
     expiry_notified_at timestamp with time zone,
     request_accepted_at timestamp with time zone,
+    last_activity_on date DEFAULT now(),
     CONSTRAINT check_508774aac0 CHECK ((member_namespace_id IS NOT NULL))
 );