Skip to content

Table session has column created_unix but struct has not related field #15445

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

Closed
2 of 6 tasks
AlliotTech opened this issue Apr 13, 2021 · 3 comments · Fixed by #15458
Closed
2 of 6 tasks

Table session has column created_unix but struct has not related field #15445

AlliotTech opened this issue Apr 13, 2021 · 3 comments · Fixed by #15458
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@AlliotTech
Copy link

AlliotTech commented Apr 13, 2021

  • Gitea version (or commit ref): 1.13.3

  • Git version:

  • Operating system: Docker (Linux)

  • Database (use [x]):

    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No
  • Log gist:

Description

I use the docker-compose deploy the gitea,the old version is 1.13.3 , I change the docker-compose.yml 's images version to 1.14.0 to update my gitea server version.
i got some WARNING log like this:

021/04/13 14:31:23 ...om/urfave/cli/app.go:524:HandleAction() [I] PING DATABASE sqlite3
2021/04/13 14:31:23 ...rfave/cli/command.go:173:Run() [W] Table session has column created_unix but struct has not related field
2021/04/13 14:31:23 routers/init.go:155:GlobalInit() [I] ORM engine initialization successful!
2021/04/13 14:31:23 ...er/issues/indexer.go:142:func2() [I] PID 16: Initializing Issue Indexer: bleve
2021/04/13 14:31:23 ...er/issues/indexer.go:221:func3() [I] Issue Indexer Initialization took 252.947412ms
2021/04/13 14:31:23 ...xer/stats/indexer.go:38:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
2021/04/13 14:31:24 ...xer/stats/indexer.go:84:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories
2021/04/13 14:31:24 cmd/web.go:189:listen() [I] Listen: http://0.0.0.0:8888
2021/04/13 14:31:24 cmd/web.go:192:listen() [I] LFS server enabled
2021/04/13 14:31:24 ...s/graceful/server.go:55:NewServer() [I] Starting new Web server: tcp:0.0.0.0:8888 on PID: 16

...

Screenshots

@zeripath
Copy link
Contributor

You can safely ignore this.

If you really do not want to see it gitea doctor recreate-table session should remove the unnecessary column from that table. (Take a backup first.)

@lunny lunny added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Apr 13, 2021
@AlliotTech
Copy link
Author

thanks for reply.
i try to run this command, but there are some problem like this : (I use docker-compose, and use sqlitedb)

docker exec -it f4e348addcd3 /bin/bash
bash-5.1# gitea doctor recreate-table session
2021/04/13 16:31:37 ...s/setting/setting.go:910:NewContext() [F] Expect user 'git' but current user is: root
bash-5.1# su - git
f4e348addcd3:~$ gitea doctor recreate-table session
2021/04/13 16:31:44 ...dules/setting/git.go:101:newGit() [I] Git Version: 2.30.2, Wire Protocol Version 2 Enabled
Failed to connect to database: Unknown database type:
Check if you are using the right config file. You can use a --config directive to specify one.

zeripath added a commit to zeripath/gitea that referenced this issue Apr 13, 2021
The Session table must have an Expiry field not a created_unix field - somehow
this migration adds the incorrect named field leading to go-gitea#15445 reports.

Fix go-gitea#15445

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath
Copy link
Contributor

@AlliotTech the command is telling you what it needs:

Check if you are using the right config file. You can use a --config directive to specify one.

Now usually on the docker the configuration file is at /data/gitea/conf/app.ini unless you have set GITEA_CUSTOM to change it. So that would mean you would need to run:

gitea doctor recreate-table --config /data/gitea/conf/app.ini session

techknowlogick pushed a commit that referenced this issue Apr 14, 2021
The Session table must have an Expiry field not a created_unix field - somehow
this migration adds the incorrect named field leading to #15445 reports.

Fix #15445

Signed-off-by: Andrew Thornton <[email protected]>
techknowlogick pushed a commit to techknowlogick/gitea that referenced this issue Apr 14, 2021
)

The Session table must have an Expiry field not a created_unix field - somehow
this migration adds the incorrect named field leading to go-gitea#15445 reports.

Fix go-gitea#15445

Signed-off-by: Andrew Thornton <[email protected]>
6543 pushed a commit that referenced this issue Apr 14, 2021
…5463)

The Session table must have an Expiry field not a created_unix field - somehow
this migration adds the incorrect named field leading to #15445 reports.

Fix #15445

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: zeripath <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Jun 4, 2021
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 10, 2021
)

The Session table must have an Expiry field not a created_unix field - somehow
this migration adds the incorrect named field leading to go-gitea#15445 reports.

Fix go-gitea#15445

Signed-off-by: Andrew Thornton <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants