Skip to content

Commit

Permalink
Merge pull request #219 from UnitapApp/refactor/relocate-chain-configs
Browse files Browse the repository at this point in the history
Ignore core migration 0005
  • Loading branch information
ShayanShiravani authored Dec 16, 2023
2 parents 5892be9 + 8be6707 commit 159ea0c
Showing 1 changed file with 64 additions and 64 deletions.
128 changes: 64 additions & 64 deletions core/migrations/0005_auto_20231203_0832.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,68 +11,68 @@ class Migration(migrations.Migration):
]

operations = [
migrations.RunSQL("""
INSERT INTO core_walletaccount (
id,
name,
private_key,
network_type
)
SELECT
id,
name,
private_key,
network_type
FROM
faucet_walletaccount;
INSERT INTO core_chain (
id,
chain_name,
symbol,
chain_id,
rpc_url,
decimals,
explorer_url,
logo_url,
native_currency_name,
poa,
rpc_url_private,
wallet_id,
modal_url,
max_gas_price,
gas_multiplier,
chain_type,
is_testnet,
is_active,
enough_fee_multiplier,
explorer_api_key,
explorer_api_url
)
SELECT
id,
chain_name,
symbol,
chain_id,
rpc_url,
decimals,
explorer_url,
logo_url,
native_currency_name,
poa,
rpc_url_private,
wallet_id,
modal_url,
max_gas_price,
gas_multiplier,
chain_type,
is_testnet,
is_active,
enough_fee_multiplier,
explorer_api_key,
explorer_api_url
FROM
faucet_chain;
SELECT setval(pg_get_serial_sequence('"core_walletaccount"','id'), coalesce(max("id"), 1), max("id") IS NOT null) FROM "core_walletaccount";
SELECT setval(pg_get_serial_sequence('"core_chain"','id'), coalesce(max("id"), 1), max("id") IS NOT null) FROM "core_chain";
""", reverse_sql="")
# migrations.RunSQL("""
# INSERT INTO core_walletaccount (
# id,
# name,
# private_key,
# network_type
# )
# SELECT
# id,
# name,
# private_key,
# network_type
# FROM
# faucet_walletaccount;
# INSERT INTO core_chain (
# id,
# chain_name,
# symbol,
# chain_id,
# rpc_url,
# decimals,
# explorer_url,
# logo_url,
# native_currency_name,
# poa,
# rpc_url_private,
# wallet_id,
# modal_url,
# max_gas_price,
# gas_multiplier,
# chain_type,
# is_testnet,
# is_active,
# enough_fee_multiplier,
# explorer_api_key,
# explorer_api_url
# )
# SELECT
# id,
# chain_name,
# symbol,
# chain_id,
# rpc_url,
# decimals,
# explorer_url,
# logo_url,
# native_currency_name,
# poa,
# rpc_url_private,
# wallet_id,
# modal_url,
# max_gas_price,
# gas_multiplier,
# chain_type,
# is_testnet,
# is_active,
# enough_fee_multiplier,
# explorer_api_key,
# explorer_api_url
# FROM
# faucet_chain;
# SELECT setval(pg_get_serial_sequence('"core_walletaccount"','id'), coalesce(max("id"), 1), max("id") IS NOT null) FROM "core_walletaccount";
# SELECT setval(pg_get_serial_sequence('"core_chain"','id'), coalesce(max("id"), 1), max("id") IS NOT null) FROM "core_chain";
# """, reverse_sql="")
]

0 comments on commit 159ea0c

Please sign in to comment.