Compliance list done.

Except for the cleanup of the hearing import data, This is the first version.
This commit is contained in:
2021-01-19 08:16:02 +05:30
parent 2b5cf93ece
commit e4783bc64e
28 changed files with 561 additions and 26 deletions

View File

@ -30,3 +30,8 @@ docker run -it -v /home/tanshu/Programming/luthor/DB/csv:/mnt --link postgres:db
sed -i 's/\x0//g' /home/tanshu/Programming/luthor/DB/csv/o-hearings.csv
docker run -it -v /home/tanshu/Programming/luthor/DB/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres luthor -c "\copy hearings(old_id, old_case_id, bench, proceedings, next_hearing_date, old_court_status_id, court_number, item_number) from /mnt/o-hearings.csv with delimiter E'\''\t'\'' null as '\'''\''"'
alembic upgrade 87a06eaadd34
# To filter out bad hearings which will now not import
# select cs.name, c.office_file_number, ch.next_hearing_date from (select case_id, next_hearing_date from hearings group by case_id, next_hearing_date having count(*) > 1) as ch inner join cases c on ch.case_id = c.id inner join case_sources cs on c.case_source_id = cs.id order by next_hearing_date desc;
# Temp fix to delete hearings
# delete from hearings where next_hearing_date is null;