darix
(Darix)
9 أكتوبر 2017، 11: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)
sam
(Sam Saffron)
9 أكتوبر 2017، 11: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)
darix
(Darix)
9 أكتوبر 2017، 11:52م
3
oh right good point … i did switch to postgresql 10 after 1.9.0.beta12~git0.7ed522c890-7.1.
إعجابَين (2)
sam
(Sam Saffron)
10 أكتوبر 2017، 12: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 أكتوبر 2017، 12: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 أكتوبر 2017، 12:44ص
6
I would much rather spending the time getting Discourse to work properly on PG 10
4 إعجابات
darix
(Darix)
10 أكتوبر 2017، 1: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 إعجابات
darix
(Darix)
11 أكتوبر 2017، 10:57ص
8
this could even be a activerecord problem no?
I believe @tgxworld was going to take a look.
4 إعجابات
darix
(Darix)
2 نوفمبر 2017، 12:49ص
10
إعجابَين (2)
ryanbigg
(Ryan Bigg)
2 نوفمبر 2017، 2: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 إعجابات
darix
(Darix)
2 نوفمبر 2017، 2: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)
Good to know, can we merge in those updated dependencies @tgxworld ?
sam
(Sam Saffron)
2 نوفمبر 2017، 10: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)
Up to you, I would prefer to do the simple / less work thing in this case though.
darix
(Darix)
24 نوفمبر 2017، 3: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)
tgxworld
(Alan Tan)
27 نوفمبر 2017، 3: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 إعجابات
darix
(Darix)
27 نوفمبر 2017، 1:36م
18
From my experience i can tell you … It works fine
But sure more testing is better.