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

Use created & updated instead BeforeInsert & BeforeUpdate #2482

Merged
merged 6 commits into from
Sep 13, 2017

Conversation

lunny
Copy link
Member

@lunny lunny commented Sep 10, 2017

Also update xorm to the latest version.

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Sep 10, 2017
@lunny lunny added this to the 1.3.0 milestone Sep 10, 2017
Copy link
Member

@ethantkoenig ethantkoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one quick question

models/models.go Outdated
@@ -239,6 +239,7 @@ func NewTestEngine(x *xorm.Engine) (err error) {

x.SetMapper(core.GonicMapper{})
x.SetLogger(log.XORMLogger)
x.ShowSQL(true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this line do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For debug to show the SQL

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So should we remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably only be set to true only when running Gitea in development mode

@lafriks
Copy link
Member

lafriks commented Sep 10, 2017

Had no rights to push to your repository. But correct checksums for govendor are:

+++ b/vendor/vendor.json
@@ -456,7 +456,7 @@
                        "revisionTime": "2017-05-19T03:21:30Z"
                },
                {
-                       "checksumSHA1": "XJ7SsJiRegdDEiIUFjsMNVnNP+w=",
+                       "checksumSHA1": "HMavuxvDhKOwmbbFnYt9hfT6jE0=",
                        "path": "github.com/go-xorm/core",
                        "revision": "da1adaf7a28ca792961721a34e6e04945200c890",
                        "revisionTime": "2017-09-09T08:56:53Z"
@@ -468,7 +468,7 @@
                        "revisionTime": "2016-08-11T02:11:45Z"
                },
                {
-                       "checksumSHA1": "6R9OhB9axG1EoeTYxcIkdscvPNU=",
+                       "checksumSHA1": "SoZDnkd5NdwE0g4MY1nTAl8ZtPo=",
                        "path": "github.com/go-xorm/xorm",
                        "revision": "c29485f954ed6495861c0098f9a1642a467299c8",
                        "revisionTime": "2017-09-10T12:58:18Z"

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 10, 2017
@ethantkoenig
Copy link
Member

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 12, 2017
@bkcsoft
Copy link
Member

bkcsoft commented Sep 12, 2017

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 12, 2017
@lafriks
Copy link
Member

lafriks commented Sep 12, 2017

I think these files are missing changes:
gpg_key.go
issue_stopwatch.go
issue_tracked_time.go

@lunny
Copy link
Member Author

lunny commented Sep 13, 2017

@lafriks those BeforeInsert are some complicated and I will send another PRs to do that.

@lafriks lafriks merged commit 005900b into go-gitea:master Sep 13, 2017
@lunny lunny deleted the lunny/use_created branch September 13, 2017 05:32
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants