Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chiefs
ChiefSend2
Commits
c9a7704b
Commit
c9a7704b
authored
Mar 29, 2021
by
Lukas Böhm
🎱
Browse files
fix migrations
parent
f2347cab
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
c9a7704b
...
...
@@ -22,4 +22,5 @@ services
# env variables and password
*.htpasswd
*.env
chiefsend2.conf
\ No newline at end of file
chiefsend2.conf
api/sqlite:hallo
api/api_test.go
View file @
c9a7704b
...
...
@@ -62,8 +62,8 @@ func Reset() {
if
err
!=
nil
{
log
.
Fatal
(
"database brok"
)
}
db
.
AutoMigrate
(
&
Attachment
{})
db
.
AutoMigrate
(
&
Share
{})
db
.
AutoMigrate
(
&
Attachment
{})
// delete everything
db
.
Where
(
"1 = 1"
)
.
Delete
(
&
Share
{})
db
.
Where
(
"1 = 1"
)
.
Delete
(
&
Attachment
{})
...
...
api/mail.html
deleted
100644 → 0
View file @
f2347cab
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Shared
</title>
</head>
<body>
Hallo test
</body>
</html>
\ No newline at end of file
api/main.go
View file @
c9a7704b
...
...
@@ -24,8 +24,8 @@ func main() {
log
.
Fatal
(
"Cannot connect database"
)
}
// Migrate the schema
db
.
AutoMigrate
(
&
Attachment
{})
db
.
AutoMigrate
(
&
Share
{})
db
.
AutoMigrate
(
&
Attachment
{})
// start
fmt
.
Println
(
"Let's go!!!"
)
ConfigureRoutes
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment