Переглянути джерело

Remove old seed script

master
Immanuel Onyeka 1 рік тому
джерело
коміт
166123d50f
1 змінених файлів з 0 додано та 361 видалено
  1. +0
    -361
      migrations/seed.sql

+ 0
- 361
migrations/seed.sql Переглянути файл

@@ -1,361 +0,0 @@
INSERT INTO address
(full_address, street, city, region, country, zip)
VALUES
(
'443 Rideau Street K1N 2B8, Ottawa, Ontario, Canada',
'443 Rideau Street',
'Ottawa',
'Ontario',
'Canada',
'K1N 2B8'
),
(
'221 Mountainview Parkway K1N 2B8, Mountainview, San Francisco, USA',
'221 Mountainview Parkway',
'Mountainview',
'San Francisco',
'USA',
'K1N 2B8'
);

INSERT IGNORE INTO branch
(type, num, address )
VALUES
('NMLS', 'abc123idk', 1),
('FSRA', 'another branch', 1);

INSERT IGNORE INTO user (
first_name,
last_name,
password,
address,
phone,
branch_id,
country,
title,
email,
verified,
role,
status
) VALUES

(
'Blue',
'Coltrane',
sha2('test123', 256),
1,
'9059991111',
(SELECT id FROM branch LIMIT 1),
'Canada',
'Loan Officer',
'test@example.com',
true,
'User',
'Free'
),

(
'Giant',
'Coltrane',
sha2('test123', 256),
1,
'9054441111',
0,
'USA',
'Mortgage Broker',
'unverified@example.com',
false,
'User',
'Free'
),

(
'Jeru',
'Mulligan',
sha2('test123', 256),
1,
'9054441111',
(SELECT id FROM branch LIMIT 1),
'USA',
'Branch Manager',
'manager@example.com',
true,
'Manager',
'Free'
);

INSERT IGNORE INTO license (
user_id,
type,
num
) VALUES
(
(SELECT id FROM user WHERE email = 'test@example.com' LIMIT 1),
'NMLS',
'randomnml523s'
),
(
(SELECT id FROM user WHERE email = 'manager@example.com' LIMIT 1),
'FSRA',
'5234gsdf'
);

INSERT IGNORE INTO loan_type (
branch_id,
user_id,
name
) VALUES
(
(SELECT id FROM branch LIMIT 1),
0,
'testType'
),
(
0,
(SELECT id FROM user WHERE email="manager@example.com" LIMIT 1),
'manager idea'
);

INSERT IGNORE INTO fee_template (
user_id,
branch_id,
amount,
perc,
type,
auto,
name
) VALUES
(
0,
(SELECT id FROM branch LIMIT 1),
0,
200,
'Title',
true,
"LenderS's Title Insurance"
),
(
(SELECT id FROM user WHERE email="manager@example.com" LIMIT 1),
(SELECT id FROM branch LIMIT 1),
5250,
0,
'Required',
true,
"Appraisal"
),
(
(SELECT id FROM user WHERE email="test@example.com" LIMIT 1),
0,
9900,
0,
"Government",
false,
"Recording Charges"
),
(
(SELECT id FROM user WHERE email="test@example.com" LIMIT 1),
0,
0,
400,
'Lender',
true,
"Processing fee"
);

INSERT IGNORE INTO loan_type (
user_id,
branch_id,
name
) VALUES
(
0,
0,
"Conventional"
),
(
0,
0,
"FHA"
),
(
0,
0,
"VA"
),
(
0,
0,
"USDA"
),
(
0,
(SELECT id FROM branch LIMIT 1),
"Test"
);

INSERT IGNORE INTO borrower (
credit_score,
monthly_income,
num
) VALUES
(
740,
500000,
1
);

INSERT INTO estimate (
user_id,
borrower_id,
transaction,
price,
property,
occupancy,
zip,
pud
) VALUES
(
(SELECT id FROM user WHERE email="test@example.com" LIMIT 1),
(SELECT id FROM borrower ORDER BY id DESC LIMIT 1),
'Purchase',
100000000,
1,
1,
'95051',
false
),
(
(SELECT id FROM user WHERE email="manager@example.com" LIMIT 1),
(SELECT id FROM borrower ORDER BY id DESC LIMIT 1),
'Purchase',
25000000,
2,
1,
'95051',
false
),
(
(SELECT id FROM user WHERE email="test@example.com" LIMIT 1),
(SELECT id FROM borrower ORDER BY id DESC LIMIT 1),
'Refinance',
50000000,
3,
2,
'95051',
false
);

INSERT INTO loan (
estimate_id,
type_id,
amount,
term,
interest,
ltv,
dti,
hoi,
name
) VALUES
(
1,
(SELECT id FROM loan_type WHERE name="Conventional"),
3300000,
30,
3.75,
88.00,
5.00,
0,
"For client 1"
),
(
1,
(SELECT id FROM loan_type WHERE name="FHA"),
2510000,
30,
3,
90.00,
6.70,
0,
"For client 2"
),
(
3,
(SELECT id FROM loan_type WHERE name="FHA"),
2510000,
1.8,
300,
90.00,
6.70,
0,
"For client 2"
),
(
2,
(SELECT id FROM loan_type WHERE name="USDA"),
8000000,
1.1,
125,
95.00,
4.90,
0,
"Random name"
);

INSERT INTO mi (
loan_id,
type,
label,
lender,
rate,
premium,
upfront,
five_year_total,
initial_premium,
initial_rate
) VALUES
(
1,
"BPM",
"National MI test loan",
"National MI",
28,
77000,
0,
4620000,
77000,
28
);


INSERT INTO estimate_result (
loan_id,
loan_payment,
total_monthly,
total_fees,
total_credits,
cash_to_close
) VALUES
(
1,
258060,
311500,
87211,
-15089,
411822
),
(
2,
198060,
241500,
54400,
-10089,
310022
),
(
3,
118000,
350000,
54400,
-70089,
411699
);

Завантаження…
Відмінити
Зберегти