darix
(Darix)
October 9, 2017, 11:28pm
1
discourse-1.9.0.beta12~git20.14b1736c74-9.1.noarch
== Seed from /srv/www/vhosts/discourse/db/fixtures/003_post_action_types.rb
- PostActionType {:id=>1, :name_key=>"bookmark", :is_flag=>false, :position=>1}
rake aborted!
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column "increment_by" does not exist
LINE 1: ...types_id_seq', (SELECT GREATEST(MAX("id")+(SELECT increment_...
^
: SELECT setval('public.post_action_types_id_seq', (SELECT GREATEST(MAX("id")+(SELECT increment_by FROM public.post_action_types_id_seq), (SELECT min_value FROM public.post_action_types_id_seq)) FROM "post_action_types"), false)
(eval):1:in `block (2 levels) in run_file'
/srv/www/vhosts/discourse/lib/tasks/db.rake:26:in `block in <top (required)>'
/usr/bin/rake.ruby2.4:22:in `load'
/usr/bin/rake.ruby2.4:22:in `<top (required)>'
/usr/bin/bundle.ruby2.4:22:in `load'
/usr/bin/bundle.ruby2.4:22:in `<main>'
PG::UndefinedColumn: ERROR: column "increment_by" does not exist
LINE 1: ...types_id_seq', (SELECT GREATEST(MAX("id")+(SELECT increment_...
^
(eval):1:in `block (2 levels) in run_file'
/srv/www/vhosts/discourse/lib/tasks/db.rake:26:in `block in <top (required)>'
/usr/bin/rake.ruby2.4:22:in `load'
/usr/bin/rake.ruby2.4:22:in `<top (required)>'
/usr/bin/bundle.ruby2.4:22:in `load'
/usr/bin/bundle.ruby2.4:22:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
1 Like
sam
(Sam Saffron)
October 9, 2017, 11:51pm
2
We are not seeing it in our official install, my guess is that this is somehow postgres 10 related.
What version of pg are you using?
1 Like
darix
(Darix)
October 9, 2017, 11:52pm
3
oh right good point … i did switch to postgresql 10 after 1.9.0.beta12~git0.7ed522c890-7.1.
2 Likes
sam
(Sam Saffron)
October 10, 2017, 12:03am
4
Well, we have not yet done the work to get Discourse to work with PG 10, we will get there.
darix
(Darix)
October 10, 2017, 12:11am
5
maybe the code should be guarded with somethin like
@conn = PG.connect(args)
if @conn.server_version >= 100000
# error out and exit cleanly
end
And maybe it should be documented that pg10 isnt supported yet.
sam
(Sam Saffron)
October 10, 2017, 12:44am
6
I would much rather spending the time getting Discourse to work properly on PG 10
4 Likes
darix
(Darix)
October 10, 2017, 1:24am
7
sure.
I just remembered that it was really easy to check the pg version (used it in my script for the last pg security update).
if you need any PG 10 testers feel free to poke me. I was beta testing pg 10 on a less important host for a while and jumped mg production machine on the day after the release.
4 Likes
darix
(Darix)
October 11, 2017, 10:57am
8
this could even be a activerecord problem no?
I believe @tgxworld was going to take a look.
4 Likes
darix
(Darix)
November 2, 2017, 12:49am
10
2 Likes
ryanbigg
(Ryan Bigg)
November 2, 2017, 2:12am
11
There was a similar issue with the sequel gem recently, which was fixed by this commit: http://github.com/jeremyevans/sequel/commit/8370980b12f59d5439344d4de89d4552f05a3d13 . Likely the same kind of fix would need to be done on seed-fu.
3 Likes
darix
(Darix)
November 2, 2017, 2:42pm
12
there is already PR for seed-fu pending https://github.com/mbleigh/seed-fu/pull/121
Just tested it here and the rake tasks complete again.
2 Likes
Good to know, can we merge in those updated dependencies @tgxworld ?
sam
(Sam Saffron)
November 2, 2017, 10:19pm
14
It is not merged in yet, I actually think we should just pull in the seed fu functionality we need into core, this keeps on breaking rails upgrade after rails upgrade and now after pg upgrades, there is like 50 lines of code we care about in this gem, maybe less.
2 Likes
Up to you, I would prefer to do the simple / less work thing in this case though.
darix
(Darix)
November 24, 2017, 3:55pm
16
JFYI: https://github.com/mbleigh/seed-fu/issues/122#issuecomment-346783243
bumping seed-fu would allow you to run on postgresql 10. then you could also remove the warning again. (it was added in the OSX docs e.g.)
1 Like
tgxworld
(Alan Tan)
November 27, 2017, 3:57am
17
Seed-fu has been updated with support for PG10
https://github.com/discourse/discourse/commit/c8157f6b0764f616c394b19bbccad843c859b201
We’ve still yet to test Discourse fully with PG 10 but that will be happening soon.
6 Likes
darix
(Darix)
November 27, 2017, 1:36pm
18
From my experience i can tell you … It works fine
But sure more testing is better.