tanshu
1e69c8eeeb
except u-product_group_modifier. It does not fit in the new scheme. Will remove in next commit so that it is added to log if needed later.
41 lines
6.8 KiB
Bash
Executable File
41 lines
6.8 KiB
Bash
Executable File
docker run -it -v /home/tanshu/cl:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres -c "drop database petty"'
|
|
docker run -it -v /home/tanshu/cl:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres -c "create database petty"'
|
|
alembic upgrade 8c06ac60d125
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy roles(id, name) from /mnt/a-Roles.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy permissions(id, name) from /mnt/b-Permissions.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy role_permissions(id, permission_id, role_id) from /mnt/c-RolePermissions.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy users(id, name, password, locked_out) from /mnt/d-Users.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy user_roles(id, user_id, role_id) from /mnt/e-UserRoles.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy customers(id, name, address, phone) from /mnt/f-Customers.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy food_tables(id, name, seats, is_active, section_id, sort_order) from /mnt/g-FoodTables.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy taxes(id, name, rate, is_fixture) from /mnt/h-Taxes.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy menu_categories(id, name, discount_limit, is_active, is_fixture, sort_order) from /mnt/i-MenuCategories.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy sale_categories(id, name, tax_id) from /mnt/j-SaleCategories.csv"'
|
|
sed -i 's/\x0//g' ~/Programming/csv/k-Products.csv
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy products(id, name, units, menu_category_id, sale_category_name, price, has_happy_hour, is_active, is_not_available, sort_order, quantity) from /mnt/k-Products.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy modifiers(id, name, show_in_bill, is_active, modifier_category_id, price) from /mnt/l-Modifiers.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy sections(id, name, is_fixture) from /mnt/m-Sections.csv"'
|
|
sed -i ':a;N;$!ba;s/\n\r\n\r\n\r\n\r\n\r\n\r/,/g' /home/tanshu/Programming/csv/n-Printers.csv
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy printers(id, name, address, cut_code) from /mnt/n-Printers.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy section_printers(id, menu_category_id, section_name, printer_name, copies) from /mnt/o-SectionPrinters.csv"'
|
|
alembic upgrade head
|
|
sed -i 's/\x0/\\N/g' ~/Programming/csv/p-Vouchers.csv
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy vouchers(id, date, pax, user_id, creation_date, last_edit_date, bill_id, food_table_id, customer_id, narration, reason, voucher_type, kot_id) from /mnt/p-Vouchers.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy kots(id, voucher_id, code, food_table_id, date, user_id) from /mnt/q-Kots.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy inventories(id, kot_id, product_id, sort_order, quantity, price, is_happy_hour, tax_rate, tax_id, discount) from /mnt/r-Inventories.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy inventory_modifiers(id, inventory_id, modifier_id, price) from /mnt/s-InventoryModifiers.csv"'
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy overview(id, voucher_id, food_table_id, status) from /mnt/t-Overview.csv"'
|
|
echo u
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy product_group_modifiers(id, product_group_id, modifier_id, show_automatically) from /mnt/u-ProductGroupModifiers.csv"'
|
|
echo v
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy reprints(id, user_id, date, voucher_id) from /mnt/v-Reprints.csv"'
|
|
echo w
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy settings(id, name, data) from /mnt/w-Settings.csv"'
|
|
echo x
|
|
docker run -it -v /home/tanshu/Programming/csv:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty -c "\copy settlements(id, voucher_id, settled, amount) from /mnt/x-VoucherSettlements.csv"'
|
|
echo z
|
|
docker run -it -v /home/tanshu/Programming/barker/DB:/mnt --link postgres:db --rm --env PGPASSWORD="123456" postgres:alpine bash -c 'psql -h db -U postgres petty < /mnt/z-RenamePermissions.sql'
|
|
|
|
# Show the file in code to see the hidden chars
|
|
# od -t c ~/Programming/csv/n-Printers.csv
|