fix: deployment issue with migration files

This commit is contained in:
Samuel Tariku 2025-09-25 22:45:09 +03:00
parent 6401c3fe0d
commit 1c2f3b66ed
10 changed files with 2 additions and 327 deletions

View File

@ -1,15 +0,0 @@
CREATE TABLE IF NOT EXISTS results (
id BIGSERIAL PRIMARY KEY,
bet_outcome_id BIGINT NOT NULL,
event_id BIGINT NOT NULL,
odd_id BIGINT NOT NULL,
market_id BIGINT NOT NULL,
status INT NOT NULL,
score VARCHAR(255),
full_time_score VARCHAR(255),
half_time_score VARCHAR(255),
ss VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (bet_outcome_id) REFERENCES bet_outcomes (id)
);

View File

@ -0,0 +1,2 @@
DROP TABLE IF EXISTS virtual_games;
DROP TABLE IF EXISTS user_game_interactions;

View File

@ -1,11 +0,0 @@
-- -- Settings Initial Data
-- INSERT INTO global_settings (key, value)
-- VALUES ('sms_provider', 'afro_message'),
-- ('max_number_of_outcomes', '30'),
-- ('bet_amount_limit', '10000000'),
-- ('daily_ticket_limit', '50'),
-- ('total_winnings_limit', '1000000'),
-- ('amount_for_bet_referral', '1000000'),
-- ('cashback_amount_cap', '1000') ON CONFLICT (key) DO
-- UPDATE
-- SET value = EXCLUDED.value;

View File

@ -1,75 +0,0 @@
-- -- Locations Initial Data
-- INSERT INTO branch_locations (key, value)
-- VALUES ('addis_ababa', 'Addis Ababa'),
-- ('dire_dawa', 'Dire Dawa'),
-- ('mekelle', 'Mekelle'),
-- ('adama', 'Adama'),
-- ('awassa', 'Awassa'),
-- ('bahir_dar', 'Bahir Dar'),
-- ('gonder', 'Gonder'),
-- ('dessie', 'Dessie'),
-- ('jimma', 'Jimma'),
-- ('jijiga', 'Jijiga'),
-- ('shashamane', 'Shashamane'),
-- ('bishoftu', 'Bishoftu'),
-- ('sodo', 'Sodo'),
-- ('arba_minch', 'Arba Minch'),
-- ('hosaena', 'Hosaena'),
-- ('harar', 'Harar'),
-- ('dilla', 'Dilla'),
-- ('nekemte', 'Nekemte'),
-- ('debre_birhan', 'Debre Birhan'),
-- ('asella', 'Asella'),
-- ('debre_markos', 'Debre Markos'),
-- ('kombolcha', 'Kombolcha'),
-- ('debre_tabor', 'Debre Tabor'),
-- ('adigrat', 'Adigrat'),
-- ('areka', 'Areka'),
-- ('weldiya', 'Weldiya'),
-- ('sebeta', 'Sebeta'),
-- ('burayu', 'Burayu'),
-- ('shire', 'Shire'),
-- ('ambo', 'Ambo'),
-- ('arsi_negele', 'Arsi Negele'),
-- ('aksum', 'Aksum'),
-- ('gambela', 'Gambela'),
-- ('bale_robe', 'Bale Robe'),
-- ('butajira', 'Butajira'),
-- ('batu', 'Batu'),
-- ('boditi', 'Boditi'),
-- ('adwa', 'Adwa'),
-- ('yirgalem', 'Yirgalem'),
-- ('waliso', 'Waliso'),
-- ('welkite', 'Welkite'),
-- ('gode', 'Gode'),
-- ('meki', 'Meki'),
-- ('negele_borana', 'Negele Borana'),
-- ('alaba_kulito', 'Alaba Kulito'),
-- ('alamata,', 'Alamata,'),
-- ('chiro', 'Chiro'),
-- ('tepi', 'Tepi'),
-- ('durame', 'Durame'),
-- ('goba', 'Goba'),
-- ('assosa', 'Assosa'),
-- ('gimbi', 'Gimbi'),
-- ('wukro', 'Wukro'),
-- ('haramaya', 'Haramaya'),
-- ('mizan_teferi', 'Mizan Teferi'),
-- ('sawla', 'Sawla'),
-- ('mojo', 'Mojo'),
-- ('dembi_dolo', 'Dembi Dolo'),
-- ('aleta_wendo', 'Aleta Wendo'),
-- ('metu', 'Metu'),
-- ('mota', 'Mota'),
-- ('fiche', 'Fiche'),
-- ('finote_selam', 'Finote Selam'),
-- ('bule_hora_town', 'Bule Hora Town'),
-- ('bonga', 'Bonga'),
-- ('kobo', 'Kobo'),
-- ('jinka', 'Jinka'),
-- ('dangila', 'Dangila'),
-- ('degehabur', 'Degehabur'),
-- ('bedessa', 'Bedessa'),
-- ('agaro', 'Agaro') ON CONFLICT (key) DO
-- UPDATE
-- SET value = EXCLUDED.value;

View File

@ -1,220 +0,0 @@
-- CREATE EXTENSION IF NOT EXISTS pgcrypto;
-- -- Users
-- INSERT INTO users (
-- id,
-- first_name,
-- last_name,
-- email,
-- phone_number,
-- password,
-- role,
-- email_verified,
-- phone_verified,
-- created_at,
-- updated_at,
-- suspended,
-- company_id
-- )
-- VALUES (
-- 1,
-- 'John',
-- 'Doe',
-- 'john.doe@example.com',
-- NULL,
-- crypt('password@123', gen_salt('bf'))::bytea,
-- 'customer',
-- TRUE,
-- FALSE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP,
-- FALSE,
-- 1
-- ),
-- (
-- 2,
-- 'Test',
-- 'Admin',
-- 'test.admin@gmail.com',
-- '0988554466',
-- crypt('password@123', gen_salt('bf'))::bytea,
-- 'admin',
-- TRUE,
-- TRUE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP,
-- FALSE,
-- 1
-- ),
-- (
-- 3,
-- 'Samuel',
-- 'Tariku',
-- 'cybersamt@gmail.com',
-- '0911111111',
-- crypt('password@123', gen_salt('bf'))::bytea,
-- 'super_admin',
-- TRUE,
-- TRUE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP,
-- FALSE,
-- NULL
-- ),
-- (
-- 4,
-- 'Kirubel',
-- 'Kibru',
-- 'kirubel.jkl679@gmail.com',
-- '0911554486',
-- crypt('password@123', gen_salt('bf'))::bytea,
-- 'super_admin',
-- TRUE,
-- TRUE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP,
-- FALSE,
-- NULL
-- ),
-- (
-- 5,
-- 'Test',
-- 'Veli',
-- 'test.veli@example.com',
-- NULL,
-- crypt('password@123', gen_salt('bf'))::bytea,
-- 'customer',
-- TRUE,
-- FALSE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP,
-- FALSE,
-- 1
-- );
-- -- Supported Operations
-- INSERT INTO supported_operations (id, name, description)
-- VALUES (1, 'SportBook', 'Sportbook operations'),
-- (2, 'Virtual', 'Virtual operations');
-- -- Wallets
-- INSERT INTO wallets (
-- id,
-- balance,
-- is_withdraw,
-- is_bettable,
-- is_transferable,
-- user_id,
-- type,
-- currency,
-- is_active,
-- created_at,
-- updated_at
-- )
-- VALUES (
-- 1,
-- 10000,
-- TRUE,
-- TRUE,
-- TRUE,
-- 1,
-- 'regular_wallet',
-- 'ETB',
-- TRUE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP
-- ),
-- (
-- 2,
-- 5000,
-- FALSE,
-- TRUE,
-- TRUE,
-- 1,
-- 'static_wallet',
-- 'ETB',
-- TRUE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP
-- ),
-- (
-- 3,
-- 20000,
-- TRUE,
-- TRUE,
-- TRUE,
-- 2,
-- 'company_wallet',
-- 'ETB',
-- TRUE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP
-- ),
-- (
-- 4,
-- 15000,
-- TRUE,
-- TRUE,
-- TRUE,
-- 2,
-- 'branch_wallet',
-- 'ETB',
-- TRUE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP
-- );
-- -- Customer Wallets
-- INSERT INTO customer_wallets (
-- id,
-- customer_id,
-- regular_wallet_id,
-- static_wallet_id
-- )
-- VALUES (1, 1, 1, 2);
-- -- Company
-- INSERT INTO companies (
-- id,
-- name,
-- slug,
-- admin_id,
-- wallet_id,
-- deducted_percentage,
-- is_active,
-- created_at,
-- updated_at
-- )
-- VALUES (
-- 1,
-- 'FortuneBets',
-- 'fortunebets',
-- 2,
-- 3,
-- 0.10,
-- TRUE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP
-- );
-- -- Branch
-- INSERT INTO branches (
-- id,
-- name,
-- location,
-- wallet_id,
-- branch_manager_id,
-- company_id,
-- is_self_owned,
-- profit_percent,
-- is_active,
-- created_at,
-- updated_at
-- )
-- VALUES (
-- 1,
-- 'Test Branch',
-- 'addis_ababa',
-- 4,
-- 2,
-- 1,
-- TRUE,
-- 0.10,
-- TRUE,
-- CURRENT_TIMESTAMP,
-- CURRENT_TIMESTAMP
-- );

View File

@ -19,7 +19,6 @@ services:
volumes:
- postgres_data:/var/lib/postgresql/data
- ./exports:/exports
mongo:
container_name: fortunebet-mongo
image: mongo:7.0.11
@ -38,7 +37,6 @@ services:
interval: 10s
timeout: 5s
retries: 5
migrate:
image: migrate/migrate
volumes:
@ -56,7 +54,6 @@ services:
]
networks:
- app
redis:
image: redis:7-alpine
ports:
@ -97,9 +94,6 @@ services:
- "29092:29092"
networks:
- app
app:
build:
context: .