apply branch.sql