Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Trevor Austin
/
mpcs-52553-austin-winter-2021
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b5ab49f3
authored
Mar 03, 2021
by
Trevor Austin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make migrations runnable with 'mysql < *.sql'
parent
4fe42651
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
week_8/examples/posts_and_comments/20200224T184700-create_tables.sql
week_8/examples/posts_and_comments/20200224T184900-insert_posts_and_comments.sql
week_8/examples/posts_and_comments/20210303T143000-create_combines_table.sql
week_8/examples/posts_and_comments/20200224T184700-create_tables.sql
View file @
b5ab49f3
-- sudo mysql -u root weblog < 20200224T184700-create_tables.sql
-- sudo mysql -u root < 20200224T184700-create_tables.sql
use
weblog
;
create
table
posts
(
id
INT
AUTO_INCREMENT
PRIMARY
KEY
,
...
...
week_8/examples/posts_and_comments/20200224T184900-insert_posts_and_comments.sql
View file @
b5ab49f3
-- sudo mysql -u root
weblog
< 20200224T184900-insert_posts_and_comments.sql
-- sudo mysql -u root < 20200224T184900-insert_posts_and_comments.sql
-- text from http://shakespeare.mit.edu/tempest/full.html
use
weblog
;
insert
into
posts
(
id
,
slug
,
title
,
body
)
values
(
1
,
"act_1_scene_1"
,
...
...
week_8/examples/posts_and_comments/20210303T143000-create_combines_table.sql
View file @
b5ab49f3
...
...
@@ -13,6 +13,8 @@
-- FOREIGN KEY(post_id) REFERENCES posts(id)
-- );
use
weblog
;
create
table
posts_and_comments
(
id
INT
AUTO_INCREMENT
PRIMARY
KEY
,
body
TEXT
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment