forked from TransformerOptimus/SuperAGI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding init db alemic and fixing acitvity feed
- Loading branch information
TransformerOptimus
committed
May 28, 2023
1 parent
79c1583
commit 2d5dc55
Showing
12 changed files
with
211 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,6 @@ venv | |
gui/node_modules | ||
gui/.next | ||
.DS_Store | ||
.DS_Store? | ||
.DS_Store? | ||
workspace/output | ||
workspace/input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
"""init_db | ||
Revision ID: 115a710c4685 | ||
Revises: | ||
Create Date: 2023-05-28 14:35:55.544155 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '115a710c4685' | ||
down_revision = None | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.create_table( | ||
'organisations', | ||
sa.Column('id', sa.Integer()), | ||
sa.Column('name', sa.String(length=256), nullable=False), | ||
sa.Column('description', sa.VARCHAR(1000)), | ||
sa.Column('created_at', sa.DateTime()), | ||
sa.Column('updated_at', sa.DateTime()), | ||
sa.PrimaryKeyConstraint('id') | ||
) | ||
|
||
op.create_table( | ||
'projects', | ||
sa.Column('id', sa.Integer()), | ||
sa.Column('name', sa.String(length=256), nullable=False), | ||
sa.Column('description', sa.VARCHAR(1000)), | ||
sa.Column('organisation_id', sa.Integer(), nullable=False), | ||
sa.Column('created_at', sa.DateTime()), | ||
sa.Column('updated_at', sa.DateTime()), | ||
sa.PrimaryKeyConstraint('id') | ||
) | ||
|
||
op.create_table( | ||
'users', | ||
sa.Column('id', sa.Integer()), | ||
sa.Column('name', sa.VARCHAR(250)), | ||
sa.Column('email', sa.VARCHAR(250), nullable=False), | ||
sa.Column('password', sa.VARCHAR(250), nullable=False), | ||
|
||
sa.Column('organisation_id', sa.Integer(), nullable=False), | ||
sa.Column('created_at', sa.DateTime()), | ||
sa.Column('updated_at', sa.DateTime()), | ||
sa.PrimaryKeyConstraint('id'), | ||
sa.UniqueConstraint('email') | ||
) | ||
|
||
op.create_table( | ||
'agents', | ||
sa.Column('id', sa.Integer()), | ||
sa.Column('project_id', sa.Integer()), | ||
sa.Column('name', sa.VARCHAR(250)), | ||
sa.Column('description', sa.VARCHAR(1000), nullable=False), | ||
|
||
sa.Column('created_at', sa.DateTime()), | ||
sa.Column('updated_at', sa.DateTime()), | ||
sa.PrimaryKeyConstraint('id'), | ||
) | ||
|
||
op.create_table( | ||
'agent_configurations', | ||
sa.Column('id', sa.Integer()), | ||
sa.Column('agent_id', sa.Integer()), | ||
sa.Column('key', sa.VARCHAR(250)), | ||
sa.Column('value', sa.VARCHAR(3000)), | ||
|
||
sa.Column('created_at', sa.DateTime()), | ||
sa.Column('updated_at', sa.DateTime()), | ||
sa.PrimaryKeyConstraint('id'), | ||
) | ||
|
||
op.create_table( | ||
'agent_executions', | ||
sa.Column('id', sa.Integer()), | ||
sa.Column('agent_id', sa.Integer()), | ||
sa.Column('status', sa.VARCHAR(250)), | ||
sa.Column('last_execution_time', sa.DateTime()), | ||
|
||
sa.Column('created_at', sa.DateTime()), | ||
sa.Column('updated_at', sa.DateTime()), | ||
sa.PrimaryKeyConstraint('id'), | ||
) | ||
|
||
op.create_table( | ||
'agent_execution_feeds', | ||
sa.Column('id', sa.Integer()), | ||
sa.Column('agent_id', sa.Integer()), | ||
sa.Column('agent_execution_id', sa.Integer()), | ||
sa.Column('feed', sa.TEXT()), | ||
sa.Column('role', sa.VARCHAR(250)), | ||
sa.Column('created_at', sa.DateTime()), | ||
sa.Column('updated_at', sa.DateTime()), | ||
sa.PrimaryKeyConstraint('id'), | ||
) | ||
|
||
op.create_table( | ||
'budgets', | ||
sa.Column('id', sa.Integer()), | ||
sa.Column('agent_id', sa.Integer()), | ||
sa.Column('cycle', sa.String()), | ||
sa.Column('budget', sa.Float()), | ||
sa.Column('created_at', sa.DateTime()), | ||
sa.Column('updated_at', sa.DateTime()), | ||
sa.PrimaryKeyConstraint('id'), | ||
) | ||
|
||
op.create_table('tools', | ||
sa.Column('created_at', sa.DateTime()), | ||
sa.Column('updated_at', sa.DateTime()), | ||
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False), | ||
sa.Column('name', sa.VARCHAR(), autoincrement=False, nullable=True), | ||
sa.Column('folder_name', sa.VARCHAR(), autoincrement=False, nullable=True), | ||
sa.Column('class_name', sa.VARCHAR(), autoincrement=False, nullable=True), | ||
sa.Column('file_name', sa.VARCHAR(), autoincrement=False, nullable=True), | ||
sa.PrimaryKeyConstraint('id', name='tools_pkey') | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
pass | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,4 @@ DB_PASSWORD: | |
MAX_TOOL_TOKEN_LIMIT: 600 | ||
|
||
# redis details | ||
REDIS_URL: localhost:6379 | ||
REDIS_URL: "localhost:6379" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters