Skip to content
Snippets Groups Projects
Commit f4e8411b authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Fixed typos breaking the upgrade procedure

parent e7e1ab89
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!338Bw db upgrade support2
......@@ -8,7 +8,6 @@ rm -f ./upgrade.log
for sql in postgres_handle_view_changes.sql \
upgrade/upgrade_table_schema.sql \
\
utility_functions.sql \
hive_accounts_view.sql \
hive_accounts_info_view.sql \
......@@ -55,8 +54,7 @@ for sql in postgres_handle_view_changes.sql \
database_api_list_comments.sql \
database_api_list_votes.sql \
update_posts_rshares.sql \
update_hive_post_root_id.sql
\
update_hive_post_root_id.sql \
upgrade/upgrade_runtime_migration.sql
do
echo Executing psql -U $1 -d $2 -f $sql
......
DROP VIEW IF EXISTS public.hive_accounts_view;
DROP VIEW IF EXISTS public.hive_accounts_view CASCADE;
CREATE OR REPLACE VIEW public.hive_accounts_view
AS
......
......@@ -174,8 +174,8 @@ IF EXISTS(SELECT data_type FROM information_schema.columns
PERFORM deps_save_and_drop_dependencies('public', 'hive_posts', true);
ALTER TABLE ONLY hive_posts
ALTER COLUMN abs_rshares SET TYPE NUMERIC,
ALTER COLUMN vote_rshares SET TYPE NUMERIC,
ALTER COLUMN abs_rshares SET DATA TYPE NUMERIC,
ALTER COLUMN vote_rshares SET DATA TYPE NUMERIC,
ADD COLUMN block_num_created INTEGER;
UPDATE hive_posts SET block_num_created = 1; -- Artificial number, since we don't have this info atm, it requires full sync
......@@ -202,7 +202,7 @@ DROP INDEX IF EXISTS hive_mentions_post_id_idx;
-- updated up to 033619277eccea70118a5b8dc0c73b913da0025f
INSERT INTO hive_db_data_migration
select 'update_posts_rshares( 0, head_block_number) execution'
where not exists (select null from hive_db_patch_level where patched_to_revision = '033619277eccea70118a5b8dc0c73b913da0025f' )
where not exists (select null from hive_db_patch_level where patched_to_revision = '033619277eccea70118a5b8dc0c73b913da0025f')
;
-- updated to e8b65adf22654203f5a79937ff2a95c5c47e10c5 - See merge request hive/hivemind!251
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment