darix
(Darix)
9 Octubre, 2017 23:28
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 me gusta
sam
(Sam Saffron)
9 Octubre, 2017 23:51
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 me gusta
darix
(Darix)
9 Octubre, 2017 23:52
3
oh right good point … i did switch to postgresql 10 after 1.9.0.beta12~git0.7ed522c890-7.1.
2 Me gusta
sam
(Sam Saffron)
10 Octubre, 2017 00:03
4
Well, we have not yet done the work to get Discourse to work with PG 10, we will get there.
darix
(Darix)
10 Octubre, 2017 00:11
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)
10 Octubre, 2017 00:44
6
I would much rather spending the time getting Discourse to work properly on PG 10
4 Me gusta
darix
(Darix)
10 Octubre, 2017 01:24
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 Me gusta
darix
(Darix)
11 Octubre, 2017 10:57
8
this could even be a activerecord problem no?
I believe @tgxworld was going to take a look.
4 Me gusta
darix
(Darix)
2 Noviembre, 2017 00:49
10
2 Me gusta
ryanbigg
(Ryan Bigg)
2 Noviembre, 2017 02:12
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 Me gusta
darix
(Darix)
2 Noviembre, 2017 14:42
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 Me gusta
Good to know, can we merge in those updated dependencies @tgxworld ?
sam
(Sam Saffron)
2 Noviembre, 2017 22:19
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 Me gusta
Up to you, I would prefer to do the simple / less work thing in this case though.
darix
(Darix)
24 Noviembre, 2017 15:55
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 me gusta
tgxworld
(Alan Tan)
27 Noviembre, 2017 03:57
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 Me gusta
darix
(Darix)
27 Noviembre, 2017 13:36
18
From my experience i can tell you … It works fine
But sure more testing is better.