Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sqlite with fastapi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ramya.r
sqlite with fastapi
Commits
de5e94a8
Commit
de5e94a8
authored
Apr 05, 2023
by
ramya.r
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first
parent
e0445384
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
10 deletions
+2
-10
internsb2.db
internsb2.db
+0
-0
script/core/schema/model.py
script/core/schema/model.py
+0
-3
script/utils/sqlite_connection.py
script/utils/sqlite_connection.py
+1
-6
script/utils/sqlite_utils.py
script/utils/sqlite_utils.py
+1
-1
No files found.
internsb2.db
View file @
de5e94a8
No preview for this file type
script/core/schema/model.py
View file @
de5e94a8
...
@@ -4,7 +4,6 @@ from sqlalchemy.ext.declarative import declarative_base
...
@@ -4,7 +4,6 @@ from sqlalchemy.ext.declarative import declarative_base
Base
=
declarative_base
()
Base
=
declarative_base
()
class
User
(
Base
):
class
User
(
Base
):
__tablename__
=
'user_info'
__tablename__
=
'user_info'
id
=
Column
(
Integer
,
primary_key
=
True
)
id
=
Column
(
Integer
,
primary_key
=
True
)
...
@@ -18,5 +17,3 @@ class Subordinates(Base):
...
@@ -18,5 +17,3 @@ class Subordinates(Base):
user_id
=
Column
(
Integer
,
ForeignKey
(
'user_info.id'
))
user_id
=
Column
(
Integer
,
ForeignKey
(
'user_info.id'
))
subordinate_ids
=
Column
(
String
,
nullable
=
True
)
subordinate_ids
=
Column
(
String
,
nullable
=
True
)
subordinate_name
=
Column
(
String
,
nullable
=
False
)
subordinate_name
=
Column
(
String
,
nullable
=
False
)
script/utils/sqlite_connection.py
View file @
de5e94a8
...
@@ -5,12 +5,7 @@ from script.config.app_config import create_sqlite_connection
...
@@ -5,12 +5,7 @@ from script.config.app_config import create_sqlite_connection
db
=
create_sqlite_connection
()
db
=
create_sqlite_connection
()
engine
=
create_engine
(
'sqlite:///internsb2.db'
,
echo
=
True
)
engine
=
create_engine
(
'sqlite:///internsb2.db'
,
echo
=
True
)
LocalSession
=
sessionmaker
(
bind
=
engine
)
LocalSession
=
sessionmaker
(
bind
=
engine
)
session
=
LocalSession
()
session
=
LocalSession
()
metadata
=
MetaData
()
metadata
=
MetaData
()
script/utils/sqlite_utils.py
View file @
de5e94a8
from
script.core.schema.model
import
User
,
Subordinates
,
Base
from
script.core.schema.model
import
User
,
Subordinates
,
Base
from
script.utils.sqlite_connection
import
session
,
engine
from
script.utils.sqlite_connection
import
session
,
engine
class
Utils
:
class
Utils
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment