From b85cfc7c1e13efdfbf88384caa9a866cc3d3613e Mon Sep 17 00:00:00 2001
From: chris48s <chris48s@users.noreply.github.com>
Date: Sat, 12 Oct 2024 09:07:10 +0100
Subject: [PATCH] add created timestamp to tokens table (#10573)

---
 migrations/1727809177709_add-created.cjs | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 migrations/1727809177709_add-created.cjs

diff --git a/migrations/1727809177709_add-created.cjs b/migrations/1727809177709_add-created.cjs
new file mode 100644
index 0000000000..ceafc9a897
--- /dev/null
+++ b/migrations/1727809177709_add-created.cjs
@@ -0,0 +1,15 @@
+exports.shorthands = undefined
+
+exports.up = pgm => {
+  pgm.addColumn('github_user_tokens', {
+    created: {
+      type: 'TIMESTAMP',
+      notNull: true,
+      default: pgm.func('CURRENT_TIMESTAMP'),
+    },
+  })
+}
+
+exports.down = pgm => {
+  pgm.dropColumn('github_user_tokens', 'created')
+}
-- 
GitLab