-
-
Notifications
You must be signed in to change notification settings - Fork 336
/
tutorial.json
102 lines (102 loc) · 5 KB
/
tutorial.json
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
{
"id": "freeCodeCamp/learn-celestial-bodies-database:v1.0.0",
"version": "2.0.0",
"summary": {
"title": "Celestial Bodies Database",
"description": "> Welcome! Are you ready to build a database of the universe?"
},
"config": {
"setup": {
"commands": [
"./.freeCodeCamp/setup.sh",
"cd .freeCodeCamp && npm install"
],
"commits": [
"7876ac42ed1e793530d52e059eed3c0085b8c919"
]
},
"testRunner": {
"command": "npm run programmatic-test",
"args": {
"filter": "--grep",
"tap": "--reporter=mocha-tap-reporter"
},
"directory": ".freeCodeCamp"
},
"repo": {
"uri": "https://github.com/freeCodeCamp/learn-celestial-bodies-database",
"branch": "v2.0.0"
},
"continue": {
"commands": [
"./.freeCodeCamp/setup.sh"
]
},
"reset": {
"commands": [
"./.freeCodeCamp/setup.sh"
]
},
"dependencies": [
{
"name": "node",
"version": ">=10"
}
],
"webhook": {
"url": "https://api.freecodecamp.org/coderoad-challenge-completed",
"events": {
"init": false,
"reset": false,
"step_complete": false,
"level_complete": false,
"tutorial_complete": true
}
}
},
"levels": [
{
"id": "1",
"title": "Instructions",
"summary": "For this project, you need to log in to PostgreSQL with psql to create your d...",
"content": "For this project, you need to log in to PostgreSQL with psql to create your database. Do that by entering `psql --username=freecodecamp --dbname=postgres` in the terminal. Make all the tests below pass to complete the project. Be sure to get creative, and have fun!\n\n**Don't forget to connect to your database after you create it** :smile:\n\nHere's some ideas for other column and table names: `description`, `has_life`, `is_spherical`, `age_in_millions_of_years`, `planet_types`, `galaxy_types`, `distance_from_earth`.\n\n**Notes:**\nIf you leave your virtual machine, your database may not be saved. You can make a dump of it by entering `pg_dump -cC --inserts -U freecodecamp universe > universe.sql` in a bash terminal (not the psql one). It will save the commands to rebuild your database in `universe.sql`. The file will be located where the command was entered. If it's anything inside the `project` folder, the file will be saved in the VM. You can rebuild the database by entering `psql -U postgres < universe.sql` in a terminal where the `.sql` file is.\n\nIf you are saving your progress on freeCodeCamp.org, after getting all the tests to pass, follow the instructions above to save a dump of your database. Save the `universe.sql` file in a public repository and submit the URL to it on freeCodeCamp.org.",
"steps": [
{
"id": "1.1",
"content": "Complete the tasks below",
"subtasks": [
"You should create a database named `universe`",
"Be sure to connect to your database with `\\c universe`. Then, you should add tables named `galaxy`, `star`, `planet`, and `moon`",
"Each table should have a primary key",
"Each primary key should automatically increment",
"Each table should have a `name` column",
"You should use the `INT` data type for at least two columns that are not a primary or foreign key",
"You should use the `NUMERIC` data type at least once",
"You should use the `TEXT` data type at least once",
"You should use the `BOOLEAN` data type on at least two columns",
"Each \"star\" should have a foreign key that references one of the rows in `galaxy`",
"Each \"planet\" should have a foreign key that references one of the rows in `star`",
"Each \"moon\" should have a foreign key that references one of the rows in `planet`",
"Your database should have at least five tables",
"Each table should have at least three rows",
"The `galaxy` and `star` tables should each have at least six rows",
"The `planet` table should have at least 12 rows",
"The `moon` table should have at least 20 rows",
"Each table should have at least three columns",
"The `galaxy`, `star`, `planet`, and `moon` tables should each have at least five columns",
"At least two columns per table should not accept `NULL` values",
"At least one column from each table should be required to be `UNIQUE`",
"All columns named `name` should be of type `VARCHAR`",
"Each primary key column should follow the naming convention `table_name_id`. For example, the `moon` table should have a primary key column named `moon_id`",
"Each foreign key column should have the same name as the column it is referencing"
],
"setup": {
"commits": [
"5fb8493694c4dccc55fc5acee35da474803006c2"
]
}
}
]
}
]
}