forked from jlgranof/Galactic-Brite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.py
156 lines (142 loc) · 13.6 KB
/
database.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
from dotenv import load_dotenv
load_dotenv()
from werkzeug.security import generate_password_hash
from backend import app, db
from backend.models import User, Category, Event, Picture
with app.app_context():
db.drop_all()
db.create_all()
demo = User(username = 'Jar Jar', email = 'therealsithleader@gungan.com', avatar_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcThQUnhWZqYrbaRtrvH6uUJxiF64UMXBWO3XQ&usqp=CAU', hashed_password = generate_password_hash("password"))
palpatine = User(username = 'The Senate', email = 'darthsidious@sith.com', avatar_url = 'https://pm1.narvii.com/6989/837a8e36313c4a026a2f5acb9fe0a9f255d93a92r1-1080-1920v2_hq.jpg')
anakin = User(username = 'Anakin Skywalker', email = 'darthvader@sith.com', avatar_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcR_sDERiegE5BSNiwpioOjCt5ndx89W1t4XNw&usqp=CAU')
jabba = User(username = 'Jabba the Hutt', email = 'jabba@hutt.com', avatar_url = 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Jabba_the_Hutt.jpg/498px-Jabba_the_Hutt.jpg')
tarkin = User(username = 'Govenor Tarkin', email = 'tarkin@deathstar.com', avatar_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQ633qJmSKAVdZul4oWR-f9wB6US_N_bHee2g&usqp=CAU')
dooku = User(username = 'Count Dooku', email = 'darthtyranus@sith.com', avatar_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQALITa_iwn6z77Xr6RMHDJG-0l8pvFYI--tA&usqp=CAU')
boba = User(username = 'Boba Fett', email = 'boba@clones.com', avatar_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcTYj2Rw2Crz24sNcXZ9v9KfnlEZupa_ZdmMKQ&usqp=CAU')
han = User(username = 'Han Solo', email = 'scruffynerfherder@smugglers.com', avatar_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcTS9TwNUBH0EbzmUt6OWZ4XhjIsiIQ84jf3tg&usqp=CAU')
luke = User(username = 'Luke Skywalker', email = 'sluke@jediacademy.com', avatar_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSczQtK1E0AgyUchH_Ov7hj5xHnQr69LT7O2g&usqp=CAU')
rey = User(username = 'Rey', email = 'nowimaskywalker@jediacademy.com', avatar_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQe0sZYKoaf065ZKjnl4G1qy1qCB6p8CNhQpw&usqp=CAU')
party = Category(type = 'Surprise Party')
production = Category(type = 'Live Productions')
exectution = Category(type = 'Live Executions')
sport = Category(type = 'Sports')
tour = Category(type = 'Tours')
launch = Category(type = 'Product Launches')
seminar = Category(type = 'Seminars')
order_66 = Event(name = 'Order 66', event_description = 'Enjoy a fun night at the Jedi Temple! We will all meet outside on the front steps, and then go in and surprise all the younglings!', host_id = 3, event_date = 'May 27, 19BBY @ 21:00', event_planet = 'Corusant', event_picture_url = 'https://i.ytimg.com/vi/lBbQg8r8tdc/maxresdefault.jpg', category_id = 1, is_featured = True)
podrace = Event(name = 'Boonta Eve Podrace', event_description = 'This is the biggest podrace of the year! Held in and around the Grand Arena in Mos Epa, this is bound to be a race you will not want to miss! Sebabulba is once again gavored to win the race. **Upgrade your ticket to sit with the Tuskan Raiders and try to shoot down the Racers!**', host_id = 4, event_date = '15:00 hours, June 12, 32BBY', event_planet = 'Tatooine', event_picture_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQoXdjeOE8nKrEu-jWNxg-nCeDGOPjBJXGbkA&usqp=CAU', category_id = 4, is_featured = True)
death_star = Event(name = 'Death Star Unvieling', event_description = 'Take a trip to the lovely planet of Alderaan, located in the Core Worlds. This planet has many famous people including the Orengas. You will get a front row introduction to the Empires new luxury cruise ship, called the Death Star. It is a state of the art cruise liner that will travel all over the galaxy under control of the great captain Govenor Tarkin.', host_id = 5, event_date = '0:00 hours January 1, 0BBY', event_planet = 'Alderaan', event_picture_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSFhGRKvL6ZzQAaN-goNpxqwbulV6VFQ1Or1g&usqp=CAU', category_id = 6, is_featured = True)
geonosis_execution = Event(name = 'Republic Leaders Execution', event_description = 'The evil Senator Amidala and the Jedis Skywalker and Kenobi have been caught!!!!! Their executions have been schedule to be held in the Petranaki Arena. Buy tickets to this execution. 3 high ranking Republic members! Once in a lifetime event!', host_id = 6, event_date = '17:00 hours, June 22, 19BBY', event_planet = 'Geonosis', event_picture_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSELfkGG_qoGhokNwcwmwSMR5ThNkXXM5iLyA&usqp=CAU', category_id = 3, is_featured = True)
carbonite = Event(name = 'Carbonite Museum Grand Opening', event_description = 'Come to Cloud City in Bespin for the Grand Opening of the Carbonite Museum! For one night only, our main attraction is the notorious smuggler Han Solo.', host_id = 7, event_date = '20:00 hours, August 12, 3ABY', event_planet = 'Bespin', event_picture_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcTqMzZ4SePebMG1Ff1VM2LVSC_mMCdG_FnVTR6G2eHidEV0RmeGX3Tn8sQpdQ&usqp=CAc', category_id = 5, is_featured = True)
darth_plagueis = Event(name = 'Squid Lake by the Mon Calamari Ballet at Coruscant Opera House', event_description = 'In the beautiful Uscru District, lies the Wonderful Galaxies Opera House. The Galaxy renound Mon Calamarin Ballet is putting on a production of Squid Lake. If you have never seen a ballet, this is the one to attend! **Upgrade your tickets to sit in the box with Chancellor Palpentine. Who knows, maybe you will learn things the Jedi can\'t teach you!**', host_id = 2, event_date = '21:00 hours, February 1 19BBY', event_planet = 'Corusant', event_picture_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSWqj-k_7il4cl1r1vfVfACzbntLKR9NEGVcA&usqp=CAU', category_id = 2, is_featured = True)
kessel = Event(name = 'Kessel Run Tour', event_description = 'Join the legendary smuggler Han Solo on his tour of the Kessel Run! Ride in the Millenium Falcon, flown by Han Solo and his partner Chewie. The tour starts on Kessel and ends sourth of the Si\'Flaata Cluster. The gole is to move spice without getting caught by Imperial Ships. Good Luck and have fun!', host_id = 8, event_date = 'October 27, 10BBY @ 11:00', event_planet = 'Kessel', event_picture_url = 'https://www.thathashtagshow.com/wp-content/uploads/2020/03/chewie-falcon-4.jpg', category_id = 5, is_featured = True)
jedi = Event(name = 'Seminar at the Jedi Academy', event_description = 'Get a free lesson in exploring the force led by the one and only Luke Skywalker! The man who brought down the Empire. Open to all beings, even if you are not force sensitive. Surprise guests may include Jedi Ghosts!', host_id = 9, event_date = 'July 12, 23ABY @ 12:00', event_planet = 'Corusant', event_picture_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcTZsvsoLWSwy8jxWt21XbIke_y6rKzHkB6zqw&usqp=CAU', category_id = 7, is_featured = True)
exegol = Event(name = 'Take Back the Galaxy', event_description = 'Calling all pilots. The Galaxy needs us. The last fragments of hope are on Exegol right now trying to defeat the Emperor and the Sith once and for all. Lightspeed to these coordinates and help take down as many ships as possible so we can witness the exectution of Darth Sidious.', host_id = 10, event_date = 'January 3, 35ABY @ 01:00', event_planet = 'Exegol', event_picture_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcS5EYbIK2tggl9gnUXxCs8aO9vg6fjhSVHMEQ&usqp=CAU', category_id = 3, is_featured = True)
senate = Event(name = 'Senate Meeting', event_description = 'Come one, Come all! This is the very last Galactic Senate assembly before it becomes the first ever Galactic Empire. LIBERTY WILL DIE WITH THUNDEROUS APPLAUSE.', host_id = 2, event_date = 'May 11, 19BBY @ 15:00', event_planet = 'Corusant', event_picture_url = 'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcTeSdOBidrXnWDCQEFulZjvNEDpCkZwrEdq0w&usqp=CAU', category_id = 1, is_featured = True)
event = Event(name = ' ', event_description = ' ', host_id = 1, event_date = ' ', event_planet = ' ', event_picture_url = ' ', category_id = 1, is_featured = True)
yoda_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Yoda_1.jpg')
throne = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Throne_Room_Battle.jpg')
space_battle_3 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Space_Battle_3.jpg')
space_battle_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Space_Battle_2.jpg')
space_battle_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Space_Battle_1.jpg')
ships_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Ships_2.jpg')
ships_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Ships_1.jpg')
poster_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Poster_2.jpg')
poster_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Poster_1.jpg')
podracing_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Podracing_2.jpg')
podracing_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Podracing_1.jpg')
obi_ani_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Obi_Ani_2.jpg')
obi_ani_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Obi_Ani_1.jpg')
obi_5 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Obi_5.jpg')
obi_4 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Obi_4.jpg')
obi_3 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Obi_3.jpg')
obi_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Obi_2.jpg')
obi_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Obi_1.jpg')
ren = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Knights_of_Ren.png')
iconic_4 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Iconic_Scenes_4.jpg')
iconic_3 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Iconic_Scenes_3.jpg')
iconic_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Iconic_Scenes_2jpg.jpg')
iconic_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Iconic_Scenes_1.jpg')
holdo = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Holdo_Maneuver.jpg')
death_star_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Death_Star_2.png')
death_star_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Death_Star_1.jpg')
darth_vader_4 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Darth_Vader_4.jpg')
darth_vader_3 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Darth_Vader_3.jpg')
darth_vader_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Darth_Vader_2.jpg')
darth_vader_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Darth_Vader_1.jpg')
darth_maul_3 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Darth_Maul_3.jpg')
darth_maul_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Darth_Maul_2.jpg')
darth_maul_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Darth_Maul.jpg')
cool = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Cool_Pic_1.jpg')
baby_1 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Baby_Yoda_1.jpg')
baby_2 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Baby_Yoda_2.jpg')
baby_3 = Picture(url = 'https://twtchr-img.s3-us-west-2.amazonaws.com/starwars/Baby_Yoda_3.jpg')
# users
db.session.add(demo)
db.session.add(palpatine)
db.session.add(anakin)
db.session.add(jabba)
db.session.add(tarkin)
db.session.add(dooku)
db.session.add(boba)
db.session.add(han)
db.session.add(luke)
db.session.add(rey)
# categories
db.session.add(party)
db.session.add(production)
db.session.add(exectution)
db.session.add(sport)
db.session.add(tour)
db.session.add(launch)
db.session.add(seminar)
# events
db.session.add(order_66)
db.session.add(podrace)
db.session.add(death_star)
db.session.add(geonosis_execution)
db.session.add(carbonite)
db.session.add(darth_plagueis)
db.session.add(kessel)
db.session.add(jedi)
db.session.add(exegol)
db.session.add(senate)
# picture_urls
db.session.add(yoda_1)
db.session.add(throne)
db.session.add(space_battle_3)
db.session.add(space_battle_2)
db.session.add(space_battle_1)
db.session.add(ships_2)
db.session.add(ships_1)
db.session.add(poster_2)
db.session.add(poster_1)
db.session.add(podracing_2)
db.session.add(podracing_1)
db.session.add(obi_ani_2)
db.session.add(obi_ani_1)
db.session.add(obi_5)
db.session.add(obi_4)
db.session.add(obi_3)
db.session.add(obi_2)
db.session.add(obi_1)
db.session.add(ren)
db.session.add(iconic_4)
db.session.add(iconic_3)
db.session.add(iconic_2)
db.session.add(iconic_1)
db.session.add(holdo)
db.session.add(death_star_2)
db.session.add(death_star_1)
db.session.add(darth_vader_4)
db.session.add(darth_vader_3)
db.session.add(darth_vader_2)
db.session.add(darth_vader_1)
db.session.add(darth_maul_3)
db.session.add(darth_maul_2)
db.session.add(darth_maul_1)
db.session.add(cool)
db.session.add(baby_3)
db.session.add(baby_2)
db.session.add(baby_1)
db.session.commit()