-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
151 lines (144 loc) · 6.18 KB
/
TODO
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[-] Manage the seed
[X] Return the seed
[X] Accept the seed
[ ] Test reuse of the seed (Blocked on retrieving values from fork_subtest)
* https://gist.github.com/exodist/42732aa8e63c492d9d20ca1465d84880
[ ] Make Oracle11 run under 4 seconds like all other drivers
* Root cause is $self->dbh->foreign_key_info() takes 7-8 seconds per table
* Called from ::DBI->_table_fk_info(), called from:
* ::Base->_setup_src_meta()
* ::Base->_load_relationships() (could be cached?)
* Is still ~4 seconds even with "_disable_fk_detection => 1"
[ ] Add support for oracle12 and oracle10 in addition to oracle11
[ ] Improve launch script to detect loopback and substitute a better address
[ ] Convert base image from ubuntu-xenial to alpine
* https://github.com/gliderlabs/docker-alpine/issues/11
[ ] Determine why lack of network causes a 10+ second delay in execution
[ ] model file modifying DBIC::SL
[ ] Relationships (has_many / belongs_to)
[ ] Validate the same number of columns provided
[ ] Add a multi-column relationship
[ ] Column nullchance
[ ] Set a nullable column to nullchance
[ ] Throw an error when setting a not-null column with a nullchance
[ ] constraints file
[ ] child requirements
[ ] "ignore" for toposort->skip
[ ] Break A-B-A relationship at A-B
[ ] Break A-B-A relationship at B-A
[ ] Throw an error when the schema is not found
[ ] Throw an error when the table is not found for `model --name`
[ ] Improve error messages for model validation failures
[ ] Write a test that demonstrates a multi-column relationship
[ ] Write a test that demonstrates a multi-column primary key
[ ] Write a test that demonstrates a self-referential relationship
[ ] Write a test that demonstrates a M2M relationship
[ ] ... with the PK on the FKs and an extra value on the crosstable.
[ ] ... with the PK on the FKs + the extra value
[ ] Test with dates (may need auto-inflation)
[ ] Add support for these databases in the docker-compose.yml
[ ] Sybase (same as SQL*Server?)
[/] SQL*Server (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker)
* http://www.freetds.org/userguide/choosingtdsprotocol.htm
[ ] MariaDB (same as mysql?)
[ ] Test with database-specific column types
[ ] Postgres JSON
[ ] All parameters should be settable by ENVVAR
* SIMS_LOADER_XYZ
* --base-directory works like this, but by hand
[ ] Handle views
[ ] Stop running within the container as root for development
* All the cpanfile work is owned by root
[ ] Change volume mapping to map `-v /:/data`
* Modify absolute paths in the host-side command to prepend "/data"?
[ ] "validate" will:
[ ] Ensure all provided files work
[ ] Connect to the database and read the DDL
[ ] Validate the model file (if any) works with the DBIC::SL model
[ ] Validate the constraints (if any) works with the DBIC::SL model
[ ] Validate the specification (if any) works with the DBIC::SL model
[ ] Automate updating of documentation from README.md
* This is done via direct edit on DockerHub.
* Can we automate this like github.com/docker-library/docs?
-------- MODEL FILE --------
---
<model>:
columns:
<name>:
value[s]: <scalar>
value[s]: <list>
type: <type>
null_chance: 0.00 .. 1.00
has_many / belongs_to:
<name>:
column[s]: <A> [,<B>, <C>, ...]
foreign:
source: <table>
column[s]: <A> [,<B>, <C>, ...]
unique_constraints:
<name>: <A> [,<B>, <C>, ...]
-------- COMMANDS --------
load_sims version --version
load_sims help --help (generic help)
CMD = load | validate | drivers | model
load_sims CMD --help
load_sims CMD \
--driver <DBD name> \
[--username|u <username> \ ]
[--password|P <password> \ ]
[--port|p <port> \ ]
[--database|d <database name> \ ]
[--constraints <filename> \ ]
[--toposort <filename> \ ]
[--model <filename> \ ]
[--seed <seed> ]
--host|h <host> \ (if --driver=sqlite, this is the filename)
--specification|s <filename> \
-------- COMPLETED --------
[X] Add a --base-directory for all the files
* Used within the container to do "SIMS_LOADER_DIRECTORY_PREFIX=/data"
[X] "drivers" to list installed DBD modules
[X] Test with more than just SQLite
* Requires the test suite to function with multiple Docker containers
[X] Get load working with sqlite
[X] Cannot run two test_app() in the same process
[X] "model" to list the generated model sims_loader is working with
[X] Lists "<model>: <table>" in alphabetical order
[X] "model <model>" to list the detail for that model
[X] Write tests for multiple tables
[X] Refactor the tests to create databases from code without SQL
[X] Fix auto-generation of values with NOT NULL (Issue with test process)
* This works by hand with Sims 0.300402
[X] Throw an error when the schema is empty or unset.
[X] Validate that a command was passed, otherwise default to "help"
[X] "types" to list installed Sims types
[X] model file modifying DBIC::SL
[X] Validate all sources exist by table name
[X] Columns
[X] Validate all columns within a source exist
[X] Set a value to a scalar
[X] Set a value to an array of scalars
[X] Column types
[X] Set a column to a sim type
[X] Throw an error when the type is unknown
[X] Unique Constraints
[X] Validate the column(s) exist
[X] Add a multi-column unique constraint
[X] Add validations for the expected structure of the model file
[X] Require only one key for <table>-<column>-{type}
[X] Relationships (has_many / belongs_to)
[X] Validate the foreign source exists
[X] Validate the columns exist
[X] "ignore" for toposort->skip
[X] Break self-relationship
[X] Change to use table name only instead of model name.
[X] Add support for these databases in the docker-compose.yml
[X] MySQL
[X] PostgreSQL
[X] Oracle 11g
[X] Convert `model` to return the table names as an array
[X] Rename tests to remove /^\d\d_/
[X] Write documentation
[X] Write documentation re: loopback not working
[X] Add enforcement of performance minimums
[X] Support setting the type in the specification