Skip to content

Commit c981978

Browse files
authored
How to Export SQL Schema Without Data (#206)
* How to Export SQL Schema Without Data * How to Export SQL Schema Without Data
1 parent f8ba5ca commit c981978

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mysqldump -u user -p -h 127.0.0.1 --no-data --skip-triggers University > university_schema_no_triggers.sql
2+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pg_dump -U user -h 127.0.0.1 -s --no-indexes -f baeldung_no_indexes_schema.sql University
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mysqldump -u user -p -h 127.0.0.1 --no-data University > university_schema.sql
2+
3+
ls -lh
4+
5+
cat university_schema.sql
6+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pg_dump -U user -h 127.0.0.1 -s -f university_schema.sql University
2+
3+
cat university_schema.sql
4+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pg_dump -U user -h 127.0.0.1 -s -n public -f baeldung_public_schema.sql University
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mysqldump -u user -p -h 127.0.0.1 --no-data University Student > university_student_schema.sql
2+
3+
cat university_student_schema.sql
4+

0 commit comments

Comments
 (0)