Sharetribe Go version 10.0.0 is now available!

[10.0.0] - 2020-05-10

Added

  • Fuzzy location #4035
  • Stripe support for Czech Republic #4049, #4069
  • Allow admin to edit the button in Hero section #4051
  • Stripe support for Romania #4066

Changed

Fixed

  • Fixed inbox doesn’t consider commission status #4044
  • Fixed encoding issue with PayPal #4045
  • Fixed missing listing image in community updates email #4046
  • Fixed scope of transations for testimonials to support Disputed #4063

Upgrade from 9.1.0 to 10.0.0

If you are not using Harmony for availability management, there is nothing special. See the General update instructions.

Otherwise, follow the instructions below.

Migrate Harmony data to Go

With this release, Go no longer uses Harmony as
backend for day- and night-based availability management. The functionality is
completely implemented within Go (there is no change in user-facing features).
However, this requires that some data from Harmony is migrated to Go’s database.

  1. Start by following the General update
    instructions
    , which will migrate the Go
    database to the latest version.

  2. Backup also your Harmony database.

  3. Run the following SQL queries to copy data over. The queries assume you are
    using the default production database names for both Go
    (sharetribe_production) and Harmony (harmony_production_db). If that’s
    not the case, replace the database names accordingly.

    INSERT INTO sharetribe_production.listing_blocked_dates (listing_id, blocked_at, created_at, updated_at)
      SELECT
      l.id, e.start, e.created_at, e.updated_at
      FROM harmony_production_db.exceptions e
      LEFT JOIN harmony_production_db.bookables b ON e.bookable_id = b.id
      LEFT JOIN sharetribe_production.listings l ON b.ref_id = l.uuid
      LEFT JOIN sharetribe_production.listing_blocked_dates bd ON bd.listing_id = l.id AND bd.blocked_at = e.start
      WHERE
      e.deleted <> 1
      AND l.id IS NOT NULL
      AND e.start >= curdate()
      AND bd.id IS NULL
      GROUP BY e.id ;
    
    
    -- delete blocked dates that are deleted in Harmony but present in Go
    
    -- needs temporary table
    CREATE TABLE sharetribe_production.tmp LIKE sharetribe_production.listing_blocked_dates;
    INSERT INTO sharetribe_production.tmp
      SELECT sharetribe_production.listing_blocked_dates.*
      FROM sharetribe_production.listing_blocked_dates;
    CREATE TABLE sharetribe_production.tmp2 (id int(11) NOT NULL, PRIMARY KEY (id));
    
    INSERT INTO sharetribe_production.tmp2 (
      SELECT
      distinct(bd.id)
      FROM harmony_production_db.exceptions e
      INNER JOIN (
        SELECT e.id, e.bookable_id, start, max(updated_at) AS max_updated_at
        FROM harmony_production_db.exceptions e
        GROUP BY e.bookable_id, e.start
      ) e2 ON e.id = e2.id AND e.updated_at = e2.max_updated_at
      LEFT JOIN harmony_production_db.bookables b ON e.bookable_id = b.id
      LEFT JOIN sharetribe_production.listings l ON b.ref_id = l.uuid
      LEFT JOIN sharetribe_production.tmp bd ON bd.listing_id = l.id AND bd.blocked_at = e.start
      WHERE
      e.deleted = 1
      AND l.id IS NOT NULL
      AND e.start >= curdate()
      AND bd.id IS NOT NULL
      GROUP BY e.id);
    
    DELETE FROM sharetribe_production.listing_blocked_dates WHERE id IN (
      SELECT id FROM sharetribe_production.tmp2);
    DROP TABLE sharetribe_production.tmp;
    DROP TABLE sharetribe_production.tmp2;
    

You can now bring Go back up.

After the migration you can delete Harmony’s database and remove the Harmony
service altogether from your system.

1 Like