Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0f2bd501
authored
Oct 12, 2024
by
Tatang S
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update cek field di initializedb
1 parent
dd4839ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
opensipkd/base/scripts/initializedb.py
opensipkd/base/scripts/initializedb.py
View file @
0f2bd50
...
...
@@ -271,7 +271,11 @@ def append_csv(table, filename, keys, get_file_func=get_file,
# Penambahan checking field nullable false wajib ada datanya 2024-09-05
for
c
in
columns_table
:
if
(
not
c
[
"nullable"
]
and
c
[
"name"
]
not
in
data
and
c
[
"name"
]
!=
"id"
):
# if (not c["nullable"] and c["name"] not in data and c["name"] != "id"):
if
(
not
c
[
"nullable"
]
and
c
[
"name"
]
not
in
data
and
c
[
"name"
]
!=
"id"
)
and
c
[
"default"
]
is
None
:
# update: tambah periksa nilai default.
# Jika default=None berarti wajib ada nilainya
# by tatang 2024-10-12
raise
Exception
(
f
"Table {str(table.__name__)} Field '{c['name']}' wajib ada {c['type']} "
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment