deploy and update database - wordpress.com · deploy and update database 1. pull the new source...

29
Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push changes 4. Delete unnecessary table 5. Make changes to database

Upload: others

Post on 21-Apr-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Deploy and Update Database

1. Pull the new source code2. Modify database connection strings and Fitbit credentials3. Commit and push changes4. Delete unnecessary table5. Make changes to database

Page 2: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

1. Pull new source code

Page 3: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

In the old version of source code, these tables were implemented using LINQ-to-SQL which is not well supported now. Reimplemented these tables using Entity Framework in the new code.

LINQ-to-SQL Entity Framework

Page 4: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push
Page 5: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push
Page 6: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

2. Modify database connection strings and Fitbit credential

Page 7: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Replace with your own database connection string

Page 8: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

You can find the connection string on Azure Portal.Don’t forget to fill in your ID and Password!!

Page 9: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Replace with your own Fitbit credential

Page 10: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

You can find your Fitbit credential at https://dev.fitbit.com/apps

Page 11: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push
Page 12: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Replace with your own database connection string

Page 13: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push
Page 14: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Replace with your own database connection string

Page 15: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push
Page 16: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Replace with your own database connection string

Page 17: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push
Page 18: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Replace with your own database connection string

Page 19: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

3. Commit change to trigger deployment

Page 20: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push
Page 21: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

4. Remove unnecessary table from database

Page 22: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Connect to your database in SQLPro for MSSQLRight-click on AspNetUser1 and select “Drop table”

Page 23: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Now access your app and play around to see if everythingworks well.

Page 24: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

5. Make changes to database

Page 25: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Add a column “Last Name” in “DiaryDatas”

Page 26: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push
Page 27: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push
Page 28: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Remove the column “Last Name” from “DiaryDatas”

Page 29: Deploy and Update Database - WordPress.com · Deploy and Update Database 1. Pull the new source code 2. Modify database connection strings and Fitbit credentials 3. Commit and push

Every time you make changes to the models in your code, you need to make corresponding changes to the database using SQL queries !