aboutsummaryrefslogtreecommitdiff
path: root/internal/db/testdata
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-05-04 16:25:57 +0800
committerGitHub <noreply@github.com>2020-05-04 16:25:57 +0800
commit9bb218734c53c98a13264c2f4f479e3633ccfe18 (patch)
treef32557409337e18d9f7959dcb2089f0bf698513b /internal/db/testdata
parent82ffca3fc9988345016c8033f7f65c5b028dfe10 (diff)
db: use GORM to backup and restore non-legacy tables (#6142)
Diffstat (limited to 'internal/db/testdata')
-rw-r--r--internal/db/testdata/backup/AccessToken.golden.json3
-rw-r--r--internal/db/testdata/backup/LFSObject.golden.json2
-rw-r--r--internal/db/testdata/backup/LoginSource.golden.json2
3 files changed, 7 insertions, 0 deletions
diff --git a/internal/db/testdata/backup/AccessToken.golden.json b/internal/db/testdata/backup/AccessToken.golden.json
new file mode 100644
index 00000000..e2085461
--- /dev/null
+++ b/internal/db/testdata/backup/AccessToken.golden.json
@@ -0,0 +1,3 @@
+{"ID":1,"UserID":1,"Name":"test1","Sha1":"56ed62d55225e9ae1275b1c4aa6e3de62f44e730","CreatedUnix":1588568886,"UpdatedUnix":1588572486}
+{"ID":2,"UserID":1,"Name":"test2","Sha1":"16fb74941e834e057d11c59db5d81cdae15be794","CreatedUnix":1588568886,"UpdatedUnix":0}
+{"ID":3,"UserID":2,"Name":"test1","Sha1":"09f170f4ee70ba035587f7df8319b2a3a3d2b74a","CreatedUnix":1588568886,"UpdatedUnix":0}
diff --git a/internal/db/testdata/backup/LFSObject.golden.json b/internal/db/testdata/backup/LFSObject.golden.json
new file mode 100644
index 00000000..45f4ec62
--- /dev/null
+++ b/internal/db/testdata/backup/LFSObject.golden.json
@@ -0,0 +1,2 @@
+{"RepoID":1,"OID":"ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f","Size":100,"Storage":"local","CreatedAt":"2020-05-04T05:08:06Z"}
+{"RepoID":2,"OID":"ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f","Size":100,"Storage":"local","CreatedAt":"2020-05-04T05:08:06Z"}
diff --git a/internal/db/testdata/backup/LoginSource.golden.json b/internal/db/testdata/backup/LoginSource.golden.json
new file mode 100644
index 00000000..08a5d1b6
--- /dev/null
+++ b/internal/db/testdata/backup/LoginSource.golden.json
@@ -0,0 +1,2 @@
+{"ID":1,"Type":4,"Name":"My PAM","IsActived":true,"IsDefault":false,"Config":null,"RawConfig":"{\"ServiceName\":\"PAM service\"}","CreatedUnix":1588568886,"UpdatedUnix":1588572486}
+{"ID":2,"Type":6,"Name":"GitHub.com","IsActived":true,"IsDefault":false,"Config":null,"RawConfig":"{\"APIEndpoint\":\"https://api.github.com\"}","CreatedUnix":1588568886,"UpdatedUnix":0}