commit melhorias sgf
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
$book=$argv[1]??'regression';require __DIR__.'/sgf-single-bootstrap.php';
|
||||
$sql=file_get_contents($repo.'/database/sql/workshop_schedule.sql');$hash=hash('sha256',$sql);
|
||||
if($host->getSchemaBuilder()->hasTable('wo_schedule_events')){echo json_encode(['passed'=>true,'replayed'=>true,'new_tables'=>0,'business_commands'=>0]).PHP_EOL;exit;}
|
||||
$host->transaction(function()use($host,$sql){$host->unprepared($sql);$host->statement('REVOKE ALL ON TABLE wo_schedule_events FROM PUBLIC');$host->statement('REVOKE ALL ON SEQUENCE wo_schedule_events_id_seq FROM PUBLIC');$host->statement('REVOKE ALL ON FUNCTION sgf_schedule_guard() FROM PUBLIC');});
|
||||
file_put_contents($work.'/workshop-schedule-schema.json',json_encode(['passed'=>true,'schema_sha256'=>$hash,'new_tables'=>1,'new_rights'=>0,'public_grants'=>false,'business_commands'=>0],JSON_PRETTY_PRINT));echo json_encode(['passed'=>true,'book'=>$book,'proof'=>$work.'/workshop-schedule-schema.json']).PHP_EOL;
|
||||
Reference in New Issue
Block a user