def setUp(self):
        self.app = create_app('testing')
        self.client = self.app.test_client()
        self.app_context = self.app.app_context()
        self.app_context.push()
        db_drop_everything(db)
        db.create_all()
        seed_data(db)

        self.drink_name = 'orange water'
        self.recipe_name_1 = 'red water'
        self.recipe_color_1 = 'red'
        self.recipe_parts_1 = 2
        self.recipe_name_2 = 'yellow water'
        self.recipe_color_2 = 'yellow'
        self.recipe_parts_2 = 3

        self.payload = {
            'title':
            self.drink_name,
            'recipe': [{
                'name': self.recipe_name_1,
                'color': self.recipe_color_1,
                'parts': self.recipe_parts_1
            }, {
                'name': self.recipe_name_2,
                'color': self.recipe_color_2,
                'parts': self.recipe_parts_2
            }]
        }
    def setUp(self):
        self.app = create_app('testing')
        self.client = self.app.test_client()
        self.app_context = self.app.app_context()
        self.app_context.push()
        db_drop_everything(db)
        db.create_all()
        seed_data(db)

        self.drink_1 = Drink('blue water', [{
            "name": "Blue Water",
            "color": "blue",
            "parts": 1
        }],
                             drink_id=1)
        self.drink_1.insert()

        self.drink_2 = Drink('green water', [{
            "name": "Blue Water",
            "color": "blue",
            "parts": 2
        }, {
            "name": "Yellow Water",
            "color": "yellow",
            "parts": 2
        }],
                             drink_id=2)
        self.drink_2.insert()
def db_seed():
    db_drop_everything(db)
    db.create_all()
    drink_1 = Drink(
        'blue water',
        [{
            "name": "Blue Water",
            "color": "blue",
            "parts": 1
        }],
    )
    drink_1.insert()

    drink_2 = Drink(
        'green water',
        [{
            "name": "Blue Water",
            "color": "blue",
            "parts": 2
        }, {
            "name": "Yellow Water",
            "color": "yellow",
            "parts": 2
        }],
    )
    drink_2.insert()
    db.session.commit()
    print(f'Drink count: {len(db.session.query(Drink).all())}')
Пример #4
0
 def setUp(self):
     self.app = create_app('testing')
     self.client = self.app.test_client()
     self.app_context = self.app.app_context()
     self.app_context.push()
     db_drop_everything(db)
     db.create_all()
     seed_data(db)
Пример #5
0
def db_seed():
    db_drop_everything(db)
    db.create_all()

    # seed anything here we might need
    user = User(username='******', email='*****@*****.**')
    db.session.add(user)

    db.session.commit()
    print(f'obj count: {len(db.session.query(User).all())}')
Пример #6
0
def db_seed():
    db_drop_everything(db)
    db.create_all()

    conn = psycopg2.connect(
        "host=localhost dbname=pack_smart_dev user=postgres")
    cur = conn.cursor()
    with open('items.csv', 'r') as f:
        next(f)  # Skip the header row.
        cur.copy_from(f, 'items', sep=',')

    conn.commit()

    db.session.commit()
    print(f'obj count: {len(db.session.query(Item).all())}')
    def setUp(self):
        self.app = create_app('testing')
        self.client = self.app.test_client()
        self.app_context = self.app.app_context()
        self.app_context.push()
        db_drop_everything(db)
        db.create_all()
        seed_data(db)
        drink = Drink('blue water', [{
            "name": "Water",
            "color": "blue",
            "parts": 1
        }],
                      drink_id=1)
        drink.insert()
        self.drink_id = drink.id

        self.bad_drink_id = 9872345
Пример #8
0
    def setUp(self):
        self.app = create_app('testing')
        self.client = self.app.test_client()
        self.app_context = self.app.app_context()
        self.app_context.push()
        db_drop_everything(db)
        db.create_all()
        seed_data(db)

        drink = Drink(
            'blue water',
            [{
                "name": "Water",
                "color": "blue",
                "parts": 1
            }]
        )
        drink.insert()

        self.original_drink = drink

        self.drink_name = 'orange water'
        self.recipe_name_1 = 'red water'
        self.recipe_color_1 = 'red'
        self.recipe_parts_1 = 2
        self.recipe_name_2 = 'yellow water'
        self.recipe_color_2 = 'yellow'
        self.recipe_parts_2 = 3

        self.payload = {
            'title': self.drink_name,
            'recipe': [{
                'name': self.recipe_name_1,
                'color': self.recipe_color_1,
                'parts': self.recipe_parts_1
            }, {
                'name': self.recipe_name_2,
                'color': self.recipe_color_2,
                'parts': self.recipe_parts_2
            }]
        }
Пример #9
0
 def tearDown(self):
     db.session.remove()
     db_drop_everything(db)
     self.app_context.pop()
Пример #10
0
def db_seed():
    db_drop_everything(db)
    db.create_all()

    #Denver Area:
    # +1 days ago:
    report1 = Report(name='',
                     lat=39.3912345,
                     long=-104.5212345,
                     description='Saw some stuff',
                     event_type='sighting',
                     city="Ponderosa Park",
                     state="CO",
                     image='example_image.com',
                     created_at=datetime(2021, 2, 28, 12, 00))
    report2 = Report(name='Phil',
                     lat=40.4312345,
                     long=-104.4012345,
                     description='Saw some stuff',
                     event_type='sighting',
                     city="Kersey",
                     state="CO",
                     image='example_image.com',
                     created_at=datetime(2021, 2, 28, 12, 00))
    report3 = Report(
        name='',
        lat=39.7112345,
        long=-103.5612345,
        description='Saw some stuff',
        event_type='sighting',
        city="Last Chance",
        state="CO",
        image='https://s.hdnux.com/photos/01/00/16/14/16835374/9/1200x0.jpg',
        created_at=datetime(2021, 2, 27, 14, 00))
    report4 = Report(
        name='Phil',
        lat=39.4512345,
        long=-105.5212345,
        description='Saw some stuff',
        event_type='sighting',
        city="Bailey",
        state="CO",
        image='https://s.hdnux.com/photos/01/00/16/14/16835374/9/1200x0.jpg',
        created_at=datetime(2021, 2, 28, 15, 00))
    report5 = Report(
        name='Austin',
        lat=39.4512345,
        long=-104.0812345,
        description='talked to some greys',
        event_type='contact',
        city="Agate",
        state="CO",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 26, 16, 00))
    report6 = Report(
        name='',
        lat=39.3912345,
        long=-104.4612345,
        description='talked to some greys',
        event_type='contact',
        city="Kiowa",
        state="CO",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 26, 17, 00))
    report7 = Report(
        name='Austin',
        lat=39.3712345,
        long=-104.5412345,
        description='talked to some greys',
        event_type='contact',
        city="Ponderosa Park",
        state="CO",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 28, 18, 00))
    report8 = Report(
        name='',
        lat=39.4112345,
        long=-104.4412345,
        description='talked to some greys',
        event_type='contact',
        city="Kiowa",
        state="CO",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 27, 19, 00))
    # +8 days ago
    report9 = Report(
        name='Hanna',
        lat=39.6312345,
        long=-104.9812345,
        description='it was chill',
        event_type='abduction',
        city="Englewood",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 21, 12, 00))
    report10 = Report(
        name='',
        lat=39.5712345,
        long=-104.9012345,
        description='it was chill',
        event_type='abduction',
        city="Centennial",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 20, 13, 00))
    report11 = Report(
        name='Hanna',
        lat=39.6512345,
        long=-105.1612345,
        description='it was chill',
        event_type='abduction',
        city="Lakewood",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 21, 14, 00))
    report12 = Report(
        name='',
        lat=39.6312345,
        long=-105.2412345,
        description='it was chill',
        event_type='abduction',
        city="Indian Hills",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 19, 15, 00))
    report13 = Report(
        name='Todd',
        lat=39.3922345,
        long=-104.4412345,
        description='it was chill',
        event_type='abduction',
        city="Kiowa",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 21, 16, 00))
    report14 = Report(
        name='',
        lat=39.3932345,
        long=-104.0412345,
        description='it was chill',
        event_type='abduction',
        city="Agate",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 20, 17, 00))
    report15 = Report(
        name='Todd',
        lat=39.3942345,
        long=-104.4412345,
        description='it was chill',
        event_type='abduction',
        city="Kiowa",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 19, 18, 00))
    report16 = Report(
        name='',
        lat=39.2052345,
        long=-104.3112345,
        description='it was chill',
        event_type='abduction',
        city="Fondis",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 21, 19, 00))
    # +30 days ago:
    report17 = Report(
        name='Hanna',
        lat=39.6442345,
        long=-104.8892345,
        description='it was chill',
        event_type='abduction',
        city="Denver",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 31, 12, 00))
    report18 = Report(
        name='',
        lat=39.7622345,
        long=-104.7892345,
        description='it was chill',
        event_type='abduction',
        city="Aurora",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 30, 13, 00))
    report19 = Report(
        name='Hanna',
        lat=39.5532345,
        long=-104.8752345,
        description='it was chill',
        event_type='abduction',
        city="Lone Tree",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 29, 14, 00))
    report20 = Report(
        name='',
        lat=39.6362345,
        long=-104.3392345,
        description='it was chill',
        event_type='abduction',
        city="Strasburg",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 28, 15, 00))
    report21 = Report(
        name='Todd',
        lat=39.4882345,
        long=-104.7642345,
        description='it was chill',
        event_type='abduction',
        city="Parker",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 27, 16, 00))
    report22 = Report(
        name='',
        lat=39.3802345,
        long=-104.4262345,
        description='it was chill',
        event_type='abduction',
        city="Kiowa",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 26, 17, 00))
    report23 = Report(
        name='Todd',
        lat=39.3872345,
        long=-104.4392345,
        description='it was chill',
        event_type='abduction',
        city="Kiowa",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 25, 18, 00))
    report24 = Report(
        name='',
        lat=38.3902345,
        long=-104.4499345,
        description='it was chill',
        event_type='abduction',
        city="Pueblo",
        state="CO",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 24, 19, 00))
    #Nashville area:
    # +1 days ago:
    report25 = Report(
        name='Phil',
        lat=36.3912345,
        long=-86.7212345,
        description='Saw some stuff',
        event_type='sighting',
        city="Millersville",
        state="TN",
        image='https://s.hdnux.com/photos/01/00/16/14/16835374/9/1200x0.jpg',
        created_at=datetime(2021, 2, 28, 12, 00))
    report26 = Report(
        name='',
        lat=36.2312345,
        long=-86.7012345,
        description='Saw some stuff',
        event_type='sighting',
        city="Nashville",
        state="TN",
        image='https://s.hdnux.com/photos/01/00/16/14/16835374/9/1200x0.jpg',
        created_at=datetime(2021, 2, 27, 13, 00))
    report27 = Report(
        name='Phil',
        lat=36.4112345,
        long=-86.7612345,
        description='Saw some stuff',
        event_type='sighting',
        city="Ridgetop",
        state="TN",
        image='https://s.hdnux.com/photos/01/00/16/14/16835374/9/1200x0.jpg',
        created_at=datetime(2021, 2, 26, 14, 00))
    report28 = Report(
        name='',
        lat=36.2512345,
        long=-86.7212345,
        description='Saw some stuff',
        event_type='sighting',
        city="Madison",
        state="TN",
        image='https://s.hdnux.com/photos/01/00/16/14/16835374/9/1200x0.jpg',
        created_at=datetime(2021, 2, 28, 15, 00))
    report29 = Report(
        name='Austin',
        lat=36.2512345,
        long=-86.7812345,
        description='talked to some greys',
        event_type='contact',
        city="Nashville",
        state="TN",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 27, 16, 00))
    report30 = Report(
        name='',
        lat=36.1912345,
        long=-86.5612345,
        description='talked to some greys',
        event_type='contact',
        city="Mt. Juliet",
        state="TN",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 26, 17, 00))
    report31 = Report(
        name='Austin',
        lat=36.1712345,
        long=-86.7412345,
        description='talked to some greys',
        event_type='contact',
        city="Nashville",
        state="TN",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 28, 18, 00))
    report32 = Report(
        name='',
        lat=36.0012345,
        long=-86.6912345,
        description='talked to some greys',
        event_type='contact',
        city="Nashville",
        state="TN",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 27, 19, 00))
    # +8 days ago
    report33 = Report(
        name='Hanna',
        lat=36.5312345,
        long=-86.7812345,
        description='it was chill',
        event_type='abduction',
        city="Cross Plains",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 21, 12, 00))
    report34 = Report(
        name='',
        lat=35.1712345,
        long=-86.6812345,
        description='it was chill',
        event_type='abduction',
        city="Fayetteville",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 20, 13, 00))
    report35 = Report(
        name='Hanna',
        lat=36.1512345,
        long=-87.6612345,
        description='it was chill',
        event_type='abduction',
        city="McEwen",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 20, 14, 00))
    report36 = Report(
        name='',
        lat=36.1312345,
        long=-86.6412345,
        description='it was chill',
        event_type='abduction',
        city="Nashville",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 19, 15, 00))
    report37 = Report(
        name='Todd',
        lat=36.3922345,
        long=-86.4412345,
        description='it was chill',
        event_type='abduction',
        city="Gallatin",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 20, 16, 00))
    report38 = Report(
        name='',
        lat=36.3132345,
        long=-86.4012345,
        description='it was chill',
        event_type='abduction',
        city="Gallatin",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 21, 17, 00))
    report39 = Report(
        name='Todd',
        lat=36.4942345,
        long=-86.4412345,
        description='it was chill',
        event_type='abduction',
        city="Graball",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 21, 18, 00))
    report40 = Report(
        name='',
        lat=36.3952345,
        long=-86.4412345,
        description='it was chill',
        event_type='abduction',
        city="Gallatin",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 19, 19, 00))
    #30 days ago
    report41 = Report(
        name='Hanna',
        lat=36.3362345,
        long=-86.4412345,
        description='it was chill',
        event_type='abduction',
        city="Gallatin",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 31, 12, 00))
    report42 = Report(
        name='',
        lat=36.3752345,
        long=-85.4312345,
        description='it was chill',
        event_type='abduction',
        city="Livingston",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 30, 13, 00))
    report43 = Report(
        name='Hanna',
        lat=35.3552345,
        long=-87.4312345,
        description='it was chill',
        event_type='abduction',
        city="Lawrenceburg",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 29, 14, 00))
    report44 = Report(
        name='',
        lat=36.3012345,
        long=-86.4112345,
        description='it was chill',
        event_type='abduction',
        city="Gallatin",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 28, 15, 00))
    report45 = Report(
        name='Todd',
        lat=34.3992345,
        long=-88.4812345,
        description='it was chill',
        event_type='abduction',
        city="Mantachie",
        state="MS",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 27, 16, 00))
    report46 = Report(
        name='',
        lat=37.3652345,
        long=-85.4012345,
        description='it was chill',
        event_type='abduction',
        city="Campbellsville",
        state="KY",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 26, 17, 00))
    report47 = Report(
        name='Todd',
        lat=36.1992345,
        long=-86.0372345,
        description='it was chill',
        event_type='abduction',
        city="New Middleton",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 25, 18, 00))
    report48 = Report(
        name='',
        lat=35.3752345,
        long=-85.4452345,
        description='it was chill',
        event_type='abduction',
        city="Dunlap",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 24, 19, 00))
    #Portland Area
    # +1 days ago: 33.3943, 104.5230
    report49 = Report(
        name='Phil',
        lat=33.3943,
        long=-104.5230,
        description='Saw some stuff',
        event_type='sighting',
        city="Roswell",
        state="NM",
        image='https://s.hdnux.com/photos/01/00/16/14/16835374/9/1200x0.jpg',
        created_at=datetime(2021, 2, 28, 12, 00))
    report50 = Report(
        name='',
        lat=33.3943,
        long=-104.6230,
        description='Saw some stuff',
        event_type='sighting',
        city="Roswell",
        state="NM",
        image='https://s.hdnux.com/photos/01/00/16/14/16835374/9/1200x0.jpg',
        created_at=datetime(2021, 2, 27, 13, 00))
    report51 = Report(
        name='Phil',
        lat=33.4943,
        long=-104.5230,
        description='Saw some stuff',
        event_type='sighting',
        city="Roswell",
        state="NM",
        image='https://s.hdnux.com/photos/01/00/16/14/16835374/9/1200x0.jpg',
        created_at=datetime(2021, 2, 26, 14, 00))
    report52 = Report(
        name='',
        lat=33.3943,
        long=-104.6030,
        description='Saw some stuff',
        event_type='sighting',
        city="Roswell",
        state="NM",
        image='https://s.hdnux.com/photos/01/00/16/14/16835374/9/1200x0.jpg',
        created_at=datetime(2021, 2, 28, 15, 00))
    report53 = Report(
        name='Austin',
        lat=33.4543,
        long=-104.5230,
        description='talked to some greys',
        event_type='contact',
        city="Roswell",
        state="NM",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 27, 16, 00))
    report54 = Report(
        name='',
        lat=33.2943,
        long=-104.5230,
        description='talked to some greys',
        event_type='contact',
        city="Roswell",
        state="NM",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 26, 17, 00))
    report55 = Report(
        name='Austin',
        lat=33.3843,
        long=-104.4930,
        description='talked to some greys',
        event_type='contact',
        city="Roswell",
        state="NM",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 28, 18, 00))
    report56 = Report(
        name='',
        lat=33.3743,
        long=-104.5030,
        description='talked to some greys',
        event_type='contact',
        city="Roswell",
        state="NM",
        image=
        'https://astronomy.com/-/media/Images/News%20and%20Observing/News/2020/10/UFOMeersburg.jpg?mw=600',
        created_at=datetime(2021, 2, 27, 19, 00))
    # +8 days ago
    report57 = Report(
        name='Hanna',
        lat=33.2943,
        long=-104.7230,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 21, 12, 00))
    report58 = Report(
        name='',
        lat=33.4143,
        long=-104.7030,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 20, 13, 00))
    report59 = Report(
        name='Hanna',
        lat=33.4243,
        long=-104.6930,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 20, 14, 00))
    report60 = Report(
        name='',
        lat=33.4343,
        long=-104.5030,
        description='it was chill',
        event_type='abduction',
        city="Roswelll",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 19, 15, 00))
    report61 = Report(
        name='Todd',
        lat=33.3243,
        long=-104.5630,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 20, 16, 00))
    report62 = Report(
        name='',
        lat=33.2743,
        long=-104.4530,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 21, 17, 00))
    report63 = Report(
        name='Todd',
        lat=33.5643,
        long=-104.4830,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 21, 18, 00))
    report64 = Report(
        name='',
        lat=33.4043,
        long=-104.4230,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 2, 19, 19, 00))
    # 30 days ago
    report65 = Report(
        name='Hanna',
        lat=33.3643,
        long=-104.5130,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 31, 12, 00))
    report66 = Report(
        name='',
        lat=33.3043,
        long=-104.5230,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 30, 13, 00))
    report67 = Report(
        name='Hanna',
        lat=33.3543,
        long=-104.6330,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 29, 14, 00))
    report68 = Report(
        name='',
        lat=33.4743,
        long=-104.4230,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 28, 15, 00))
    report69 = Report(
        name='Todd',
        lat=33.4243,
        long=-104.4730,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="MS",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 27, 16, 00))
    report70 = Report(
        name='',
        lat=33.3043,
        long=-104.5030,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="KY",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 26, 17, 00))
    report71 = Report(
        name='Todd',
        lat=33.3243,
        long=-104.5630,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 25, 18, 00))
    report72 = Report(
        name='',
        lat=33.3143,
        long=-104.4530,
        description='it was chill',
        event_type='abduction',
        city="Roswell",
        state="TN",
        image='https://s.hdnux.com/photos/77/16/41/16574564/4/1200x0.jpg',
        created_at=datetime(2021, 1, 24, 19, 00))
    db.session.add(report1)
    db.session.add(report2)
    db.session.add(report3)
    db.session.add(report4)
    db.session.add(report5)
    db.session.add(report6)
    db.session.add(report7)
    db.session.add(report8)
    db.session.add(report9)
    db.session.add(report10)
    db.session.add(report11)
    db.session.add(report12)
    db.session.add(report13)
    db.session.add(report14)
    db.session.add(report15)
    db.session.add(report16)
    db.session.add(report17)
    db.session.add(report18)
    db.session.add(report19)
    db.session.add(report20)
    db.session.add(report21)
    db.session.add(report22)
    db.session.add(report23)
    db.session.add(report24)
    db.session.add(report25)
    db.session.add(report26)
    db.session.add(report27)
    db.session.add(report28)
    db.session.add(report29)
    db.session.add(report30)
    db.session.add(report31)
    db.session.add(report32)
    db.session.add(report33)
    db.session.add(report34)
    db.session.add(report35)
    db.session.add(report36)
    db.session.add(report37)
    db.session.add(report38)
    db.session.add(report39)
    db.session.add(report40)
    db.session.add(report41)
    db.session.add(report42)
    db.session.add(report43)
    db.session.add(report44)
    db.session.add(report45)
    db.session.add(report46)
    db.session.add(report47)
    db.session.add(report48)
    db.session.add(report49)
    db.session.add(report50)
    db.session.add(report51)
    db.session.add(report52)
    db.session.add(report53)
    db.session.add(report54)
    db.session.add(report55)
    db.session.add(report56)
    db.session.add(report57)
    db.session.add(report58)
    db.session.add(report59)
    db.session.add(report60)
    db.session.add(report61)
    db.session.add(report62)
    db.session.add(report63)
    db.session.add(report64)
    db.session.add(report65)
    db.session.add(report66)
    db.session.add(report67)
    db.session.add(report68)
    db.session.add(report69)
    db.session.add(report70)
    db.session.add(report71)
    db.session.add(report72)

    db.session.commit()

    comment1 = Comment(report_id=report1.id, text="that's crazy dude")
    comment2 = Comment(report_id=report1.id, text="the truth is out there")
    comment65 = Comment(report_id=report1.id, text="fake news")
    comment66 = Comment(report_id=report1.id, text="sounds legit")
    comment67 = Comment(report_id=report1.id, text="whaaaaaaat")
    comment73 = Comment(report_id=report1.id, text="wild")
    comment3 = Comment(report_id=report2.id, text="that's crazy dude")
    comment4 = Comment(report_id=report2.id, text="the truth is out there")
    comment5 = Comment(report_id=report3.id, text="that's crazy dude")
    comment6 = Comment(report_id=report3.id, text="the truth is out there")
    comment7 = Comment(report_id=report4.id, text="that's crazy dude")
    comment8 = Comment(report_id=report4.id, text="the truth is out there")
    comment68 = Comment(report_id=report4.id, text="incredible")
    comment69 = Comment(report_id=report4.id, text="im jealous")
    comment9 = Comment(report_id=report5.id, text="that's crazy dude")
    comment10 = Comment(report_id=report5.id, text="the truth is out there")
    comment11 = Comment(report_id=report6.id, text="that's crazy dude")
    comment12 = Comment(report_id=report6.id, text="the truth is out there")
    comment13 = Comment(report_id=report7.id, text="that's crazy dude")
    comment70 = Comment(report_id=report7.id, text="I want to believe")
    comment71 = Comment(report_id=report7.id, text="I do believe")
    comment14 = Comment(report_id=report7.id, text="the truth is out there")
    comment15 = Comment(report_id=report8.id, text="that's crazy dude")
    comment16 = Comment(report_id=report8.id, text="the truth is out there")
    comment17 = Comment(report_id=report9.id, text="that's crazy dude")
    comment18 = Comment(report_id=report9.id, text="the truth is out there")
    comment19 = Comment(report_id=report10.id, text="that's crazy dude")
    comment72 = Comment(report_id=report10.id, text="sure")
    comment20 = Comment(report_id=report10.id, text="the truth is out there")
    comment21 = Comment(report_id=report11.id, text="that's crazy dude")
    comment22 = Comment(report_id=report11.id, text="the truth is out there")
    comment23 = Comment(report_id=report12.id, text="that's crazy dude")
    comment24 = Comment(report_id=report12.id, text="the truth is out there")
    comment25 = Comment(report_id=report13.id, text="that's crazy dude")
    comment26 = Comment(report_id=report13.id, text="the truth is out there")
    comment27 = Comment(report_id=report14.id, text="that's crazy dude")
    comment28 = Comment(report_id=report14.id, text="the truth is out there")
    comment29 = Comment(report_id=report15.id, text="that's crazy dude")
    comment30 = Comment(report_id=report15.id, text="the truth is out there")
    comment31 = Comment(report_id=report16.id, text="that's crazy dude")
    comment32 = Comment(report_id=report16.id, text="the truth is out there")
    comment33 = Comment(report_id=report17.id, text="that's crazy dude")
    comment34 = Comment(report_id=report17.id, text="the truth is out there")
    comment35 = Comment(report_id=report18.id, text="that's crazy dude")
    comment36 = Comment(report_id=report18.id, text="the truth is out there")
    comment37 = Comment(report_id=report19.id, text="that's crazy dude")
    comment38 = Comment(report_id=report19.id, text="the truth is out there")
    comment39 = Comment(report_id=report20.id, text="that's crazy dude")
    comment40 = Comment(report_id=report20.id, text="the truth is out there")
    comment41 = Comment(report_id=report21.id, text="that's crazy dude")
    comment42 = Comment(report_id=report21.id, text="the truth is out there")
    comment43 = Comment(report_id=report22.id, text="that's crazy dude")
    comment44 = Comment(report_id=report22.id, text="the truth is out there")
    comment45 = Comment(report_id=report23.id, text="that's crazy dude")
    comment46 = Comment(report_id=report23.id, text="the truth is out there")
    comment47 = Comment(report_id=report24.id, text="that's crazy dude")
    comment48 = Comment(report_id=report24.id, text="the truth is out there")
    comment49 = Comment(report_id=report25.id, text="that's crazy dude")
    comment50 = Comment(report_id=report25.id, text="the truth is out there")
    comment51 = Comment(report_id=report26.id, text="that's crazy dude")
    comment52 = Comment(report_id=report26.id, text="the truth is out there")
    comment53 = Comment(report_id=report27.id, text="that's crazy dude")
    comment54 = Comment(report_id=report27.id, text="the truth is out there")
    comment55 = Comment(report_id=report28.id, text="that's crazy dude")
    comment56 = Comment(report_id=report28.id, text="the truth is out there")
    comment57 = Comment(report_id=report29.id, text="that's crazy dude")
    comment58 = Comment(report_id=report29.id, text="the truth is out there")
    comment59 = Comment(report_id=report30.id, text="that's crazy dude")
    comment60 = Comment(report_id=report30.id, text="the truth is out there")
    comment61 = Comment(report_id=report31.id, text="that's crazy dude")
    comment62 = Comment(report_id=report31.id, text="the truth is out there")
    comment63 = Comment(report_id=report32.id, text="that's crazy dude")
    comment64 = Comment(report_id=report32.id, text="the truth is out there")
    comment74 = Comment(report_id=report33.id, text="that's crazy dude")
    comment75 = Comment(report_id=report33.id, text="the truth is out there")
    comment76 = Comment(report_id=report34.id, text="that's crazy dude")
    comment77 = Comment(report_id=report34.id, text="the truth is out there")
    comment78 = Comment(report_id=report35.id, text="that's crazy dude")
    comment79 = Comment(report_id=report35.id, text="the truth is out there")
    comment80 = Comment(report_id=report36.id, text="that's crazy dude")
    comment81 = Comment(report_id=report36.id, text="the truth is out there")
    comment82 = Comment(report_id=report37.id, text="that's crazy dude")
    comment83 = Comment(report_id=report37.id, text="the truth is out there")
    comment84 = Comment(report_id=report38.id, text="that's crazy dude")
    comment85 = Comment(report_id=report38.id, text="the truth is out there")
    comment86 = Comment(report_id=report39.id, text="that's crazy dude")
    comment87 = Comment(report_id=report39.id, text="the truth is out there")
    comment88 = Comment(report_id=report40.id, text="that's crazy dude")
    comment89 = Comment(report_id=report40.id, text="the truth is out there")
    comment90 = Comment(report_id=report41.id, text="that's crazy dude")
    comment91 = Comment(report_id=report41.id, text="the truth is out there")
    comment92 = Comment(report_id=report42.id, text="that's crazy dude")
    comment93 = Comment(report_id=report42.id, text="the truth is out there")
    comment94 = Comment(report_id=report43.id, text="that's crazy dude")
    comment95 = Comment(report_id=report43.id, text="the truth is out there")
    comment96 = Comment(report_id=report44.id, text="that's crazy dude")
    comment97 = Comment(report_id=report44.id, text="the truth is out there")
    comment98 = Comment(report_id=report45.id, text="that's crazy dude")
    comment99 = Comment(report_id=report45.id, text="the truth is out there")
    comment100 = Comment(report_id=report46.id, text="that's crazy dude")
    comment101 = Comment(report_id=report46.id, text="the truth is out there")
    comment102 = Comment(report_id=report47.id, text="that's crazy dude")
    comment103 = Comment(report_id=report47.id, text="the truth is out there")
    comment104 = Comment(report_id=report48.id, text="that's crazy dude")
    comment105 = Comment(report_id=report48.id, text="the truth is out there")
    comment106 = Comment(report_id=report49.id, text="that's crazy dude")
    comment107 = Comment(report_id=report49.id, text="the truth is out there")
    comment108 = Comment(report_id=report50.id, text="that's crazy dude")
    comment109 = Comment(report_id=report50.id, text="the truth is out there")
    comment110 = Comment(report_id=report51.id, text="that's crazy dude")
    comment111 = Comment(report_id=report51.id, text="the truth is out there")
    comment112 = Comment(report_id=report52.id, text="that's crazy dude")
    comment113 = Comment(report_id=report52.id, text="the truth is out there")
    comment114 = Comment(report_id=report53.id, text="that's crazy dude")
    comment115 = Comment(report_id=report53.id, text="the truth is out there")
    comment116 = Comment(report_id=report54.id, text="that's crazy dude")
    comment117 = Comment(report_id=report54.id, text="the truth is out there")
    comment118 = Comment(report_id=report55.id, text="that's crazy dude")
    comment119 = Comment(report_id=report55.id, text="the truth is out there")
    comment120 = Comment(report_id=report56.id, text="that's crazy dude")
    comment121 = Comment(report_id=report56.id, text="the truth is out there")
    comment122 = Comment(report_id=report57.id, text="that's crazy dude")
    comment123 = Comment(report_id=report57.id, text="the truth is out there")
    comment124 = Comment(report_id=report58.id, text="that's crazy dude")
    comment125 = Comment(report_id=report58.id, text="the truth is out there")
    comment126 = Comment(report_id=report59.id, text="that's crazy dude")
    comment127 = Comment(report_id=report59.id, text="the truth is out there")
    comment128 = Comment(report_id=report60.id, text="that's crazy dude")
    comment129 = Comment(report_id=report60.id, text="the truth is out there")
    comment130 = Comment(report_id=report61.id, text="that's crazy dude")
    comment131 = Comment(report_id=report61.id, text="the truth is out there")
    comment132 = Comment(report_id=report62.id, text="that's crazy dude")
    comment133 = Comment(report_id=report62.id, text="the truth is out there")
    comment134 = Comment(report_id=report63.id, text="that's crazy dude")
    comment135 = Comment(report_id=report63.id, text="the truth is out there")
    comment136 = Comment(report_id=report64.id, text="that's crazy dude")
    comment137 = Comment(report_id=report64.id, text="the truth is out there")
    comment138 = Comment(report_id=report65.id, text="that's crazy dude")
    comment139 = Comment(report_id=report65.id, text="the truth is out there")
    comment140 = Comment(report_id=report47.id, text="that's crazy dude")
    comment141 = Comment(report_id=report66.id, text="the truth is out there")
    comment142 = Comment(report_id=report66.id, text="that's crazy dude")
    comment143 = Comment(report_id=report67.id, text="the truth is out there")
    comment144 = Comment(report_id=report67.id, text="that's crazy dude")
    comment145 = Comment(report_id=report68.id, text="the truth is out there")
    comment146 = Comment(report_id=report68.id, text="that's crazy dude")
    comment147 = Comment(report_id=report69.id, text="the truth is out there")
    comment148 = Comment(report_id=report69.id, text="that's crazy dude")
    comment149 = Comment(report_id=report70.id, text="the truth is out there")

    db.session.add(comment1)
    db.session.add(comment2)
    db.session.add(comment3)
    db.session.add(comment4)
    db.session.add(comment5)
    db.session.add(comment6)
    db.session.add(comment7)
    db.session.add(comment8)
    db.session.add(comment9)
    db.session.add(comment10)
    db.session.add(comment11)
    db.session.add(comment12)
    db.session.add(comment13)
    db.session.add(comment14)
    db.session.add(comment15)
    db.session.add(comment16)
    db.session.add(comment17)
    db.session.add(comment18)
    db.session.add(comment19)
    db.session.add(comment20)
    db.session.add(comment21)
    db.session.add(comment22)
    db.session.add(comment23)
    db.session.add(comment24)
    db.session.add(comment25)
    db.session.add(comment26)
    db.session.add(comment27)
    db.session.add(comment28)
    db.session.add(comment29)
    db.session.add(comment30)
    db.session.add(comment31)
    db.session.add(comment32)
    db.session.add(comment33)
    db.session.add(comment34)
    db.session.add(comment35)
    db.session.add(comment36)
    db.session.add(comment37)
    db.session.add(comment38)
    db.session.add(comment39)
    db.session.add(comment40)
    db.session.add(comment41)
    db.session.add(comment42)
    db.session.add(comment43)
    db.session.add(comment44)
    db.session.add(comment45)
    db.session.add(comment46)
    db.session.add(comment47)
    db.session.add(comment48)
    db.session.add(comment49)
    db.session.add(comment50)
    db.session.add(comment51)
    db.session.add(comment52)
    db.session.add(comment53)
    db.session.add(comment54)
    db.session.add(comment55)
    db.session.add(comment56)
    db.session.add(comment57)
    db.session.add(comment58)
    db.session.add(comment59)
    db.session.add(comment60)
    db.session.add(comment61)
    db.session.add(comment62)
    db.session.add(comment63)
    db.session.add(comment64)
    db.session.add(comment65)
    db.session.add(comment66)
    db.session.add(comment67)
    db.session.add(comment68)
    db.session.add(comment69)
    db.session.add(comment70)
    db.session.add(comment71)
    db.session.add(comment72)
    db.session.add(comment73)
    db.session.add(comment74)
    db.session.add(comment75)
    db.session.add(comment76)
    db.session.add(comment77)
    db.session.add(comment78)
    db.session.add(comment79)
    db.session.add(comment80)
    db.session.add(comment81)
    db.session.add(comment82)
    db.session.add(comment83)
    db.session.add(comment84)
    db.session.add(comment85)
    db.session.add(comment86)
    db.session.add(comment87)
    db.session.add(comment88)
    db.session.add(comment89)
    db.session.add(comment90)
    db.session.add(comment91)
    db.session.add(comment92)
    db.session.add(comment93)
    db.session.add(comment94)
    db.session.add(comment95)
    db.session.add(comment96)
    db.session.add(comment97)
    db.session.add(comment98)
    db.session.add(comment99)
    db.session.add(comment100)
    db.session.add(comment101)
    db.session.add(comment102)
    db.session.add(comment103)
    db.session.add(comment104)
    db.session.add(comment105)
    db.session.add(comment106)
    db.session.add(comment107)
    db.session.add(comment108)
    db.session.add(comment109)
    db.session.add(comment110)
    db.session.add(comment111)
    db.session.add(comment112)
    db.session.add(comment113)
    db.session.add(comment114)
    db.session.add(comment115)
    db.session.add(comment116)
    db.session.add(comment117)
    db.session.add(comment118)
    db.session.add(comment119)
    db.session.add(comment120)
    db.session.add(comment121)
    db.session.add(comment122)
    db.session.add(comment123)
    db.session.add(comment124)
    db.session.add(comment125)
    db.session.add(comment126)
    db.session.add(comment127)
    db.session.add(comment128)
    db.session.add(comment129)
    db.session.add(comment130)
    db.session.add(comment131)
    db.session.add(comment132)
    db.session.add(comment133)
    db.session.add(comment134)
    db.session.add(comment135)
    db.session.add(comment136)
    db.session.add(comment137)
    db.session.add(comment138)
    db.session.add(comment139)
    db.session.add(comment140)
    db.session.add(comment141)
    db.session.add(comment142)
    db.session.add(comment143)
    db.session.add(comment144)
    db.session.add(comment145)
    db.session.add(comment146)
    db.session.add(comment147)
    db.session.add(comment148)
    db.session.add(comment149)
    db.session.commit()
    print(f'obj count: {len(db.session.query(Report).all())}')
    print(f'obj count: {len(db.session.query(Comment).all())}')
Пример #11
0
def db_seed():
    db_drop_everything(db)
    db.create_all()

    #users
    ian = User(username='******', email='*****@*****.**', xp=0)
    shaunda = User(username='******', email='*****@*****.**', xp=0)
    olga = User(username='******', email='*****@*****.**', xp=0)
    caleb = User(username='******', email='*****@*****.**', xp=0)
    curtis = User(username='******', email='*****@*****.**', xp=0)
    jake = User(username='******', email='*****@*****.**', xp=0)
    carson = User(username='******', email='*****@*****.**', xp=0)
    george = User(username='******', email='*****@*****.**', xp=0)

    #quests
    url = urlparse.urlparse(os.environ.get('DATABASE_URL'))
    dbname = url.path[1:]
    host = url.hostname
    user = url.username
    password = url.password
    conn = psycopg2.connect(
        f"host={host} dbname={dbname} user={user} password={password}")
    cur = conn.cursor()
    with open('./data/quests.csv', 'r') as f:
        reader = csv.reader(f)
        next(reader)
        for row in reader:
            cur.execute("INSERT INTO quests VALUES(%s, %s, %s, %s, %s, %s)",
                        row)
    conn.commit()

    #encounters
    conn = psycopg2.connect(
        f"host={host} dbname={dbname} user={user} password={password}")
    cur = conn.cursor()
    with open('./data/encounters.csv', 'r') as f:
        reader = csv.reader(f)
        next(reader)
        for row in reader:
            cur.execute("INSERT INTO encounters VALUES(%s, %s, %s, %s)", row)
    conn.commit()

    #actions
    conn = psycopg2.connect(
        f"host={host} dbname={dbname} user={user} password={password}")
    cur = conn.cursor()
    with open('./data/actions.csv', 'r') as f:
        reader = csv.reader(f)
        next(reader)
        for row in reader:
            cur.execute("INSERT INTO actions VALUES(%s, %s, %s)", row)
    conn.commit()

    db.session.add(ian)
    db.session.add(shaunda)
    db.session.add(olga)
    db.session.add(caleb)
    db.session.add(curtis)
    db.session.add(jake)
    db.session.add(carson)
    db.session.add(george)
    db.session.commit()

    print(f'obj count: {len(db.session.query(User).all())}')
    print(f'obj count: {len(db.session.query(Quest).all())}')
    print(f'obj count: {len(db.session.query(UserQuest).all())}')
    print(f'obj count: {len(db.session.query(Encounter).all())}')
    print(f'obj count: {len(db.session.query(Action).all())}')
def db_setup():
    db_drop_everything(db)
    db.create_all()
Пример #13
0
def db_seed():
    db_drop_everything(db)
    db.create_all()

    # seed anything here we might need
    user = User(name='iandouglas', email='*****@*****.**')
    db.session.add(user)

    user = db.session.query(User).filter_by(id=1).one()
    room_1 = Room(
        name='Kitchen',
        image=
        'https://user-images.githubusercontent.com/65255478/109369416-81cc3b80-7859-11eb-8bc6-f4647040555a.png',
        user_id=user.id)
    room_2 = Room(
        name='Living Room',
        image=
        'https://user-images.githubusercontent.com/65255478/109369440-901a5780-7859-11eb-83e9-350d3f3494ec.png',
        user_id=user.id)
    room_3 = Room(
        name='Backyard',
        image=
        'https://user-images.githubusercontent.com/65255478/109369423-87c21c80-7859-11eb-8559-43a0cf43e9a9.png',
        user_id=user.id)
    room_4 = Room(
        name='Bedroom',
        image=
        'https://user-images.githubusercontent.com/65255478/109369427-8a247680-7859-11eb-9330-b282ea6b4907.png',
        user_id=user.id)
    db.session.add(room_1)
    db.session.add(room_2)
    db.session.add(room_3)
    db.session.add(room_4)

    room_1 = db.session.query(Room).filter_by(id=1).one()
    room_2 = db.session.query(Room).filter_by(id=2).one()
    room_3 = db.session.query(Room).filter_by(id=3).one()
    room_4 = db.session.query(Room).filter_by(id=4).one()

    memory_1 = Memory(
        image=
        'https://itdoesnttastelikechicken.com/wp-content/uploads/2017/05/super-moist-vegan-banana-nut-muffins-easy-dairy-free-facebook.jpg’',
        song=
        'https://open.spotify.com/album/3mGmn1JDde3XyKQqZTJUAL?highlight=spotify:track:4QxDOjgpYtQDxxbWPuEJOy',
        description='Your mothers secret recipe for those banana nut muffins',
        aromas='Crisp winter air, hot cocoa, fresh baked banana bread',
        x=500,
        y=550,
        room_id=room_1.id)
    memory_2 = Memory(
        image=
        'https://merriam-webster.com/assets/mw/images/article/art-wap-landing-mp-lg/[email protected]',
        song=
        'https://open.spotify.com/album/3alZBOvPaK3hgMEEymw4Yr?highlight=spotify:track:0mHyWYXmmCB9iQyK18m3FQ',
        description='Babysittng your grandchildren every Sunday',
        aromas='Baby powder, diapers, fresh peaches',
        x=209,
        y=379,
        room_id=room_1.id)
    memory_3 = Memory(
        image=
        'https://cdn.images.express.co.uk/img/dynamic/41/590x/monopoly-gamer-board-games-reboot-super-mario-nintendo-823505.jpg',
        song=
        'https://open.spotify.com/album/6mmv0gwumlFGWDGJXF4yEv?highlight=spotify:track:29U7stRjqHU6rMiS8BfaI9',
        description='Playing monopoly and drinking lemonade',
        aromas='Lemons, fresh cut roses',
        x=677,
        y=785,
        room_id=room_1.id)

    memory_4 = Memory(
        image=
        'https://i.pinimg.com/236x/3e/81/2f/3e812f93fc028189d5b2b761e164ff6a--a-christmas-story-christmas-morning.jpg',
        song=
        'https://open.spotify.com/track/2yPoRJvPqwpbGLJPRikrZW?si=13b08af526f24414',
        description=
        'Christmas morning when Ralphie got the Red Rider he wanted so badly',
        aromas='Fresh pine, torn paper, coffee',
        x=414,
        y=346,
        room_id=room_2.id)
    memory_5 = Memory(
        image=
        'https://static01.nyt.com/images/2016/09/12/watching/12watching1/12watching1-superJumbo-v2.jpg',
        song=
        'https://open.spotify.com/track/3MXfueQqoiF93unHCQZos2?si=a274b3b4699741f2',
        description=
        'Mike, Lucas, and Will playing Dungeons and Dragons while having a sleep over',
        aromas='Mac n cheese, stinky shoes',
        x=224,
        y=756,
        room_id=room_2.id)
    memory_6 = Memory(
        image=
        'https://i1.wp.com/highdefdiscnews.com/wp-content/uploads/2018/10/the_great_outdoors_11.png?ssl=1',
        song=
        'https://open.spotify.com/track/7demHL0GXA6YmTNqw3Btz8?si=1c2afaeb41a14a8b',
        description='One of the best camping trips with the family',
        aromas='Campfire, pine trees, old cabin',
        x=570,
        y=714,
        room_id=room_2.id)

    memory_7 = Memory(
        image='https://c1.staticflickr.com/9/8452/7984891423_309149ea12_b.jpg',
        song=
        'https://open.spotify.com/album/77spqXa3VNN0mw13PgWWyY?highlight=spotify:track:6n6OQfBpCgzF9oEg8zhBN7',
        description='Playing with my grandkids in the backyard',
        aromas='Freshly mowed grass',
        x=602,
        y=831,
        room_id=room_3.id)
    memory_8 = Memory(
        image=
        'https://wpcluster.dctdigital.com/sundaypost/wp-content/uploads/sites/13/2017/08/JE0165_royalty-free-image_family-BBQ-smartbrush_AW2_060217-1024x683.jpg',
        song=
        'https://open.spotify.com/album/4sSXylKcBB3p47VfrBJlfK?highlight=spotify:track:1LM5zQv5pBKPyO7rm7Uz6U',
        description='Family BBQs after church on Sundays',
        aromas='grill smoke',
        x=530,
        y=463,
        room_id=room_3.id)
    memory_9 = Memory(
        image=
        'https://cdn.images.dailystar.co.uk/dynamic/1/photos/551000/620x/Young-girl-flying-a-kite-682596.jpg',
        song=
        'https://open.spotify.com/album/3usnShwygMXVZB4IV5dwnU?highlight=spotify:track:2RlgNHKcydI9sayD2Df2xp',
        description='Teaching the kids how to fly kites',
        aromas='Sunshine on the skin',
        x=200,
        y=831,
        room_id=room_3.id)

    memory_10 = Memory(
        image=
        'https://amz.netweather.tv/monthly_09_2015/post-2611-0-09582700-1442308742.jpg',
        song=
        'https://open.spotify.com/album/1CsuCA05y9r7ftG9bGGtWV?highlight=spotify:track:3m167vBQI5YLK0a1m6L6Y1',
        description=
        'The blizzard where the whole neighborhood came together and dug out the driveway',
        aromas='Crisp winter air, hot cocoa, bacon and eggs for breakfast',
        x=510,
        y=422,
        room_id=room_4.id)
    memory_11 = Memory(
        image=
        'https://flashbak.com/wp-content/uploads/2017/09/078_1967-1026x1024.jpg',
        song=
        'https://open.spotify.com/album/6lPb7Eoon6QPbscWbMsk6a?highlight=spotify:track:4uGIJG1jYFonGc4LGp5uQL',
        description='Dancing at Lindas garden party',
        aromas='Fruit punch, aftershave, honeysuckle',
        x=315,
        y=647,
        room_id=room_4.id)
    memory_12 = Memory(
        image=
        'https://groovyhistory.com/content/124227/f0e9bedffd72ead0c2b92d96674be472.jpg',
        song=
        'https://open.spotify.com/album/5Qcef60m4gcckV24PmPYVq?highlight=spotify:track:2rUHBIfbMBB92n1gSfSqwF',
        description=
        'Tailgating outside Madison Square Garden waiting to see Bruce Springsteen in concert',
        aromas='Net hairspray, beer, hot pavement',
        x=119,
        y=377,
        room_id=room_4.id)

    db.session.add(memory_1)
    db.session.add(memory_2)
    db.session.add(memory_3)
    db.session.add(memory_4)
    db.session.add(memory_5)
    db.session.add(memory_6)
    db.session.add(memory_7)
    db.session.add(memory_8)
    db.session.add(memory_9)
    db.session.add(memory_10)
    db.session.add(memory_11)
    db.session.add(memory_12)

    db.session.commit()
    print(f'obj count: {len(db.session.query(User).all())}')
    print(f'obj count: {len(db.session.query(Room).all())}')
    print(f'obj count: {len(db.session.query(Memory).all())}')