Skip to content

Commit

Permalink
new minidb tables
Browse files Browse the repository at this point in the history
  • Loading branch information
capnsue committed Jan 23, 2025
1 parent 838ac6f commit 4c7e734
Show file tree
Hide file tree
Showing 22 changed files with 51,424 additions and 20 deletions.
8 changes: 4 additions & 4 deletions dr18/pg2mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# now write out each file in mssql syntax

# tables
t = open('mssql_tables.sql', 'w')
t = open('mssql_tables_12112024.sql', 'w')

for table in tables:
t.write('\n\n')
Expand All @@ -75,19 +75,19 @@
t.write(line.replace('minidb.', 'dbo.').replace('boolean','bit').replace('character varying', 'varchar').replace('text', 'varchar(500)').replace('character', 'varchar').replace('plan', 'planname'))

# pks
p = open('mssql_pk.sql', 'w')
p = open('mssql_pk_12112024.sql', 'w')
for pk in pks:
p.write('\n\n')
for line in pk:
p.write(line.replace('minidb.', 'dbo.').replace('ONLY', '').replace('PRIMARY KEY', 'PRIMARY KEY CLUSTERED'))

i = open('mssql_indexes.sql', 'w')
i = open('mssql_indexes_12112024.sql', 'w')
for idx in indexes:
i.write('\n\n')
for line in idx:
i.write(line.replace('minidb.', 'dbo.').replace('CREATE INDEX', 'CREATE NONCLUSTERED INDEX').replace('USING btree', ''))

ff = open('mssql_fk.sql', 'w')
ff = open('mssql_fk_12112024.sql', 'w')
for fk in fks:
ff.write('\n\n')
for line in fk:
Expand Down
4 changes: 2 additions & 2 deletions dr19/create_minidb2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ GO
CREATE DATABASE [minidb2]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'minidb2', FILENAME = N'D:\sql_db\minidb2.mdf' , SIZE = 10048KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10048KB ),
FILEGROUP [MINIDB]
( NAME = N'minidb2', FILENAME = N'D:\sql_db\minidb2.mdf' , SIZE = 10048KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10048KB ),
--FILEGROUP [MINIDB]
( NAME = N'minidb01', FILENAME = N'D:\sql_db\minidb01.ndf' , SIZE = 3072000KB , MAXSIZE = UNLIMITED, FILEGROWTH = 102400KB ),
( NAME = N'minidb02', FILENAME = N'D:\sql_db\minidb02.ndf' , SIZE = 3072000KB , MAXSIZE = UNLIMITED, FILEGROWTH = 102400KB ),
( NAME = N'minidb03', FILENAME = N'D:\sql_db\minidb03.ndf' , SIZE = 3072000KB , MAXSIZE = UNLIMITED, FILEGROWTH = 102400KB ),
Expand Down
Loading

0 comments on commit 4c7e734

Please sign in to comment.