gitscope
https://dev.kronoz.win/r/marzneshin.git
app/db/migrations/versions/20faa9f18c0a_init.py · v0.3.0-alpha10
Source
1 a47eb4c Dawsh 2y ago """Initiate Marzneshin database
2 a47eb4c Dawsh 2y ago
3 a47eb4c Dawsh 2y ago Revision ID: 20faa9f18c0a
4 a47eb4c Dawsh 2y ago Revises:
5 a47eb4c Dawsh 2y ago Create Date: 2024-01-15 09:48:24.808505
6 a47eb4c Dawsh 2y ago
7 a47eb4c Dawsh 2y ago """
8 6457378 Dawsh 2y ago
9 a47eb4c Dawsh 2y ago import os
10 a47eb4c Dawsh 2y ago from alembic import op
11 a47eb4c Dawsh 2y ago import sqlalchemy as sa
12 a47eb4c Dawsh 2y ago from app.utils.crypto import generate_certificate
13 a47eb4c Dawsh 2y ago
14 a47eb4c Dawsh 2y ago # revision identifiers, used by Alembic.
15 cba9caa Dawsh 2y ago revision = "20faa9f18c0a"
16 a47eb4c Dawsh 2y ago down_revision = None
17 a47eb4c Dawsh 2y ago branch_labels = None
18 a47eb4c Dawsh 2y ago depends_on = None
19 a47eb4c Dawsh 2y ago
20 a47eb4c Dawsh 2y ago
21 a47eb4c Dawsh 2y ago def upgrade() -> None:
22 a47eb4c Dawsh 2y ago # ### commands auto generated by Alembic - please adjust! ###
23 cba9caa Dawsh 2y ago op.create_table(
24 cba9caa Dawsh 2y ago "admins",
25 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
26 cba9caa Dawsh 2y ago sa.Column("username", sa.String(length=32), nullable=True),
27 cba9caa Dawsh 2y ago sa.Column("hashed_password", sa.String(length=128), nullable=True),
28 cba9caa Dawsh 2y ago sa.Column("created_at", sa.DateTime(), nullable=True),
29 cba9caa Dawsh 2y ago sa.Column("is_sudo", sa.Boolean(), nullable=True),
30 cba9caa Dawsh 2y ago sa.Column("password_reset_at", sa.DateTime(), nullable=True),
31 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
32 cba9caa Dawsh 2y ago )
33 cba9caa Dawsh 2y ago op.create_index(op.f("ix_admins_username"), "admins", ["username"], unique=True)
34 cba9caa Dawsh 2y ago
35 cba9caa Dawsh 2y ago jwttable = op.create_table(
36 cba9caa Dawsh 2y ago "jwt",
37 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
38 cba9caa Dawsh 2y ago sa.Column("secret_key", sa.String(length=64), nullable=False),
39 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
40 a47eb4c Dawsh 2y ago )
41 a47eb4c Dawsh 2y ago op.bulk_insert(jwttable, [{"id": 1, "secret_key": os.urandom(32).hex()}])
42 a47eb4c Dawsh 2y ago
43 cba9caa Dawsh 2y ago nodestable = op.create_table(
44 cba9caa Dawsh 2y ago "nodes",
45 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
46 cba9caa Dawsh 2y ago sa.Column("name", sa.String(length=256), nullable=True),
47 cba9caa Dawsh 2y ago sa.Column("address", sa.String(length=256), nullable=True),
48 cba9caa Dawsh 2y ago sa.Column("port", sa.Integer(), nullable=True),
49 010b05d Dawsh 2y ago sa.Column("connection_backend", sa.String(32), nullable=True),
50 cba9caa Dawsh 2y ago sa.Column("xray_version", sa.String(length=32), nullable=True),
51 cba9caa Dawsh 2y ago sa.Column(
52 cba9caa Dawsh 2y ago "status",
53 cba9caa Dawsh 2y ago sa.Enum("healthy", "unhealthy", "disabled", name="nodestatus"),
54 cba9caa Dawsh 2y ago nullable=False,
55 cba9caa Dawsh 2y ago ),
56 cba9caa Dawsh 2y ago sa.Column("last_status_change", sa.DateTime(), nullable=True),
57 cba9caa Dawsh 2y ago sa.Column("message", sa.String(length=1024), nullable=True),
58 cba9caa Dawsh 2y ago sa.Column("created_at", sa.DateTime(), nullable=True),
59 cba9caa Dawsh 2y ago sa.Column("uplink", sa.BigInteger(), nullable=True),
60 cba9caa Dawsh 2y ago sa.Column("downlink", sa.BigInteger(), nullable=True),
61 cba9caa Dawsh 2y ago sa.Column(
62 cba9caa Dawsh 2y ago "usage_coefficient",
63 cba9caa Dawsh 2y ago sa.Float(),
64 cba9caa Dawsh 2y ago server_default=sa.text("(1.0)"),
65 cba9caa Dawsh 2y ago nullable=False,
66 cba9caa Dawsh 2y ago ),
67 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
68 cba9caa Dawsh 2y ago sa.UniqueConstraint("name"),
69 cba9caa Dawsh 2y ago sa.UniqueConstraint("address", "port"),
70 cba9caa Dawsh 2y ago )
71 cba9caa Dawsh 2y ago op.bulk_insert(
72 cba9caa Dawsh 2y ago nodestable,
73 cba9caa Dawsh 2y ago [
74 cba9caa Dawsh 2y ago {
75 cba9caa Dawsh 2y ago "name": "local",
76 cba9caa Dawsh 2y ago "address": "127.0.0.1",
77 cba9caa Dawsh 2y ago "port": 53042,
78 cba9caa Dawsh 2y ago "connection_backend": "grpcio",
79 cba9caa Dawsh 2y ago "status": "unhealthy",
80 cba9caa Dawsh 2y ago }
81 cba9caa Dawsh 2y ago ],
82 cba9caa Dawsh 2y ago )
83 cba9caa Dawsh 2y ago op.create_table(
84 cba9caa Dawsh 2y ago "services",
85 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
86 cba9caa Dawsh 2y ago sa.Column("name", sa.String(length=64), nullable=True),
87 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
88 a47eb4c Dawsh 2y ago )
89 6457378 Dawsh 2y ago
90 cba9caa Dawsh 2y ago systable = op.create_table(
91 cba9caa Dawsh 2y ago "system",
92 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
93 cba9caa Dawsh 2y ago sa.Column("uplink", sa.BigInteger(), nullable=True),
94 cba9caa Dawsh 2y ago sa.Column("downlink", sa.BigInteger(), nullable=True),
95 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
96 a47eb4c Dawsh 2y ago )
97 a47eb4c Dawsh 2y ago op.bulk_insert(systable, [{"id": 1, "uplink": 0, "downlink": 0}])
98 6457378 Dawsh 2y ago
99 cba9caa Dawsh 2y ago tlstable = op.create_table(
100 cba9caa Dawsh 2y ago "tls",
101 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
102 cba9caa Dawsh 2y ago sa.Column("key", sa.String(length=4096), nullable=False),
103 cba9caa Dawsh 2y ago sa.Column("certificate", sa.String(length=2048), nullable=False),
104 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
105 a47eb4c Dawsh 2y ago )
106 a47eb4c Dawsh 2y ago tls = generate_certificate()
107 cba9caa Dawsh 2y ago op.bulk_insert(tlstable, [{"id": 1, "key": tls["key"], "certificate": tls["cert"]}])
108 a47eb4c Dawsh 2y ago
109 cba9caa Dawsh 2y ago op.create_table(
110 cba9caa Dawsh 2y ago "inbounds",
111 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
112 cba9caa Dawsh 2y ago sa.Column(
113 cba9caa Dawsh 2y ago "protocol",
114 cba9caa Dawsh 2y ago sa.Enum("VMess", "VLESS", "Trojan", "Shadowsocks", name="proxytypes"),
115 cba9caa Dawsh 2y ago nullable=True,
116 cba9caa Dawsh 2y ago ),
117 cba9caa Dawsh 2y ago sa.Column("tag", sa.String(length=256), nullable=False),
118 010b05d Dawsh 2y ago sa.Column("config", sa.String(512), nullable=False),
119 cba9caa Dawsh 2y ago sa.Column("node_id", sa.Integer(), nullable=True),
120 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
121 cba9caa Dawsh 2y ago ["node_id"],
122 cba9caa Dawsh 2y ago ["nodes.id"],
123 cba9caa Dawsh 2y ago ),
124 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
125 cba9caa Dawsh 2y ago sa.UniqueConstraint("node_id", "tag"),
126 cba9caa Dawsh 2y ago )
127 cba9caa Dawsh 2y ago op.create_index(op.f("ix_inbounds_node_id"), "inbounds", ["node_id"], unique=False)
128 cba9caa Dawsh 2y ago op.create_table(
129 cba9caa Dawsh 2y ago "node_usages",
130 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
131 cba9caa Dawsh 2y ago sa.Column("created_at", sa.DateTime(), nullable=False),
132 cba9caa Dawsh 2y ago sa.Column("node_id", sa.Integer(), nullable=True),
133 cba9caa Dawsh 2y ago sa.Column("uplink", sa.BigInteger(), nullable=True),
134 cba9caa Dawsh 2y ago sa.Column("downlink", sa.BigInteger(), nullable=True),
135 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
136 cba9caa Dawsh 2y ago ["node_id"],
137 cba9caa Dawsh 2y ago ["nodes.id"],
138 cba9caa Dawsh 2y ago ),
139 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
140 cba9caa Dawsh 2y ago sa.UniqueConstraint("created_at", "node_id"),
141 cba9caa Dawsh 2y ago )
142 cba9caa Dawsh 2y ago op.create_table(
143 cba9caa Dawsh 2y ago "users",
144 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
145 cba9caa Dawsh 2y ago sa.Column("username", sa.String(length=32), nullable=True),
146 cba9caa Dawsh 2y ago sa.Column("key", sa.String(length=64), nullable=True),
147 cba9caa Dawsh 2y ago sa.Column(
148 cba9caa Dawsh 2y ago "status",
149 cba9caa Dawsh 2y ago sa.Enum("active", "limited", "expired", "on_hold", name="userstatus"),
150 cba9caa Dawsh 2y ago nullable=False,
151 cba9caa Dawsh 2y ago ),
152 cba9caa Dawsh 2y ago sa.Column("used_traffic", sa.BigInteger(), nullable=True),
153 cba9caa Dawsh 2y ago sa.Column("data_limit", sa.BigInteger(), nullable=True),
154 cba9caa Dawsh 2y ago sa.Column(
155 cba9caa Dawsh 2y ago "data_limit_reset_strategy",
156 cba9caa Dawsh 2y ago sa.Enum(
157 cba9caa Dawsh 2y ago "no_reset",
158 cba9caa Dawsh 2y ago "day",
159 cba9caa Dawsh 2y ago "week",
160 cba9caa Dawsh 2y ago "month",
161 cba9caa Dawsh 2y ago "year",
162 cba9caa Dawsh 2y ago name="userdatalimitresetstrategy",
163 cba9caa Dawsh 2y ago ),
164 cba9caa Dawsh 2y ago nullable=False,
165 cba9caa Dawsh 2y ago ),
166 cba9caa Dawsh 2y ago sa.Column("ip_limit", sa.Integer(), nullable=False),
167 010b05d Dawsh 2y ago sa.Column("settings", sa.String(1024), nullable=True),
168 cba9caa Dawsh 2y ago sa.Column("expire", sa.DateTime(), nullable=True),
169 cba9caa Dawsh 2y ago sa.Column("admin_id", sa.Integer(), nullable=True),
170 cba9caa Dawsh 2y ago sa.Column("sub_updated_at", sa.DateTime(), nullable=True),
171 cba9caa Dawsh 2y ago sa.Column("sub_last_user_agent", sa.String(length=512), nullable=True),
172 cba9caa Dawsh 2y ago sa.Column("created_at", sa.DateTime(), nullable=True),
173 cba9caa Dawsh 2y ago sa.Column("note", sa.String(length=500), nullable=True),
174 cba9caa Dawsh 2y ago sa.Column("online_at", sa.DateTime(), nullable=True),
175 cba9caa Dawsh 2y ago sa.Column("on_hold_expire_duration", sa.BigInteger(), nullable=True),
176 cba9caa Dawsh 2y ago sa.Column("on_hold_timeout", sa.DateTime(), nullable=True),
177 cba9caa Dawsh 2y ago sa.Column("edit_at", sa.DateTime(), nullable=True),
178 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
179 cba9caa Dawsh 2y ago ["admin_id"],
180 cba9caa Dawsh 2y ago ["admins.id"],
181 cba9caa Dawsh 2y ago ),
182 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
183 cba9caa Dawsh 2y ago sa.UniqueConstraint("key"),
184 cba9caa Dawsh 2y ago )
185 cba9caa Dawsh 2y ago op.create_index(op.f("ix_users_username"), "users", ["username"], unique=True)
186 cba9caa Dawsh 2y ago op.create_table(
187 cba9caa Dawsh 2y ago "hosts",
188 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
189 cba9caa Dawsh 2y ago sa.Column("remark", sa.String(length=256), nullable=False),
190 cba9caa Dawsh 2y ago sa.Column("address", sa.String(length=256), nullable=False),
191 cba9caa Dawsh 2y ago sa.Column("port", sa.Integer(), nullable=True),
192 cba9caa Dawsh 2y ago sa.Column("path", sa.String(length=256), nullable=True),
193 cba9caa Dawsh 2y ago sa.Column("sni", sa.String(length=256), nullable=True),
194 cba9caa Dawsh 2y ago sa.Column("host", sa.String(length=256), nullable=True),
195 cba9caa Dawsh 2y ago sa.Column(
196 cba9caa Dawsh 2y ago "security",
197 cba9caa Dawsh 2y ago sa.Enum("inbound_default", "none", "tls", name="inboundhostsecurity"),
198 cba9caa Dawsh 2y ago nullable=False,
199 cba9caa Dawsh 2y ago ),
200 cba9caa Dawsh 2y ago sa.Column(
201 cba9caa Dawsh 2y ago "alpn",
202 cba9caa Dawsh 2y ago sa.Enum("none", "h2", "http/1.1", "h2,http/1.1", name="proxyhostalpn"),
203 cba9caa Dawsh 2y ago server_default="none",
204 cba9caa Dawsh 2y ago nullable=False,
205 cba9caa Dawsh 2y ago ),
206 cba9caa Dawsh 2y ago sa.Column(
207 cba9caa Dawsh 2y ago "fingerprint",
208 cba9caa Dawsh 2y ago sa.Enum(
209 cba9caa Dawsh 2y ago "none",
210 cba9caa Dawsh 2y ago "chrome",
211 cba9caa Dawsh 2y ago "firefox",
212 cba9caa Dawsh 2y ago "safari",
213 cba9caa Dawsh 2y ago "ios",
214 cba9caa Dawsh 2y ago "android",
215 cba9caa Dawsh 2y ago "edge",
216 cba9caa Dawsh 2y ago "360",
217 cba9caa Dawsh 2y ago "qq",
218 cba9caa Dawsh 2y ago "random",
219 cba9caa Dawsh 2y ago "randomized",
220 cba9caa Dawsh 2y ago name="proxyhostfingerprint",
221 cba9caa Dawsh 2y ago ),
222 cba9caa Dawsh 2y ago server_default="none",
223 cba9caa Dawsh 2y ago nullable=False,
224 cba9caa Dawsh 2y ago ),
225 cba9caa Dawsh 2y ago sa.Column("inbound_id", sa.Integer(), nullable=False),
226 cba9caa Dawsh 2y ago sa.Column("allowinsecure", sa.Boolean(), nullable=True),
227 cba9caa Dawsh 2y ago sa.Column("is_disabled", sa.Boolean(), nullable=True),
228 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
229 cba9caa Dawsh 2y ago ["inbound_id"],
230 cba9caa Dawsh 2y ago ["inbounds.id"],
231 cba9caa Dawsh 2y ago ),
232 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
233 cba9caa Dawsh 2y ago )
234 cba9caa Dawsh 2y ago op.create_table(
235 cba9caa Dawsh 2y ago "inbounds_services",
236 cba9caa Dawsh 2y ago sa.Column("inbound_id", sa.Integer(), nullable=False),
237 cba9caa Dawsh 2y ago sa.Column("service_id", sa.Integer(), nullable=False),
238 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
239 cba9caa Dawsh 2y ago ["inbound_id"],
240 cba9caa Dawsh 2y ago ["inbounds.id"],
241 cba9caa Dawsh 2y ago ),
242 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
243 cba9caa Dawsh 2y ago ["service_id"],
244 cba9caa Dawsh 2y ago ["services.id"],
245 cba9caa Dawsh 2y ago ),
246 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("inbound_id", "service_id"),
247 cba9caa Dawsh 2y ago )
248 cba9caa Dawsh 2y ago op.create_table(
249 cba9caa Dawsh 2y ago "node_user_usages",
250 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
251 cba9caa Dawsh 2y ago sa.Column("created_at", sa.DateTime(), nullable=False),
252 cba9caa Dawsh 2y ago sa.Column("user_id", sa.Integer(), nullable=True),
253 cba9caa Dawsh 2y ago sa.Column("node_id", sa.Integer(), nullable=True),
254 cba9caa Dawsh 2y ago sa.Column("used_traffic", sa.BigInteger(), nullable=True),
255 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
256 cba9caa Dawsh 2y ago ["node_id"],
257 cba9caa Dawsh 2y ago ["nodes.id"],
258 cba9caa Dawsh 2y ago ),
259 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
260 cba9caa Dawsh 2y ago ["user_id"],
261 cba9caa Dawsh 2y ago ["users.id"],
262 cba9caa Dawsh 2y ago ),
263 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
264 cba9caa Dawsh 2y ago sa.UniqueConstraint("created_at", "user_id", "node_id"),
265 cba9caa Dawsh 2y ago )
266 cba9caa Dawsh 2y ago op.create_table(
267 cba9caa Dawsh 2y ago "notification_reminders",
268 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
269 cba9caa Dawsh 2y ago sa.Column("user_id", sa.Integer(), nullable=True),
270 cba9caa Dawsh 2y ago sa.Column(
271 cba9caa Dawsh 2y ago "type",
272 cba9caa Dawsh 2y ago sa.Enum("expiration_date", "data_usage", name="remindertype"),
273 cba9caa Dawsh 2y ago nullable=False,
274 cba9caa Dawsh 2y ago ),
275 cba9caa Dawsh 2y ago sa.Column("expires_at", sa.DateTime(), nullable=True),
276 cba9caa Dawsh 2y ago sa.Column("created_at", sa.DateTime(), nullable=True),
277 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
278 cba9caa Dawsh 2y ago ["user_id"],
279 cba9caa Dawsh 2y ago ["users.id"],
280 cba9caa Dawsh 2y ago ),
281 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
282 cba9caa Dawsh 2y ago )
283 cba9caa Dawsh 2y ago op.create_table(
284 cba9caa Dawsh 2y ago "user_usage_logs",
285 cba9caa Dawsh 2y ago sa.Column("id", sa.Integer(), nullable=False),
286 cba9caa Dawsh 2y ago sa.Column("user_id", sa.Integer(), nullable=True),
287 cba9caa Dawsh 2y ago sa.Column("used_traffic_at_reset", sa.BigInteger(), nullable=False),
288 cba9caa Dawsh 2y ago sa.Column("reset_at", sa.DateTime(), nullable=True),
289 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
290 cba9caa Dawsh 2y ago ["user_id"],
291 cba9caa Dawsh 2y ago ["users.id"],
292 cba9caa Dawsh 2y ago ),
293 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("id"),
294 cba9caa Dawsh 2y ago )
295 cba9caa Dawsh 2y ago op.create_table(
296 cba9caa Dawsh 2y ago "users_services",
297 cba9caa Dawsh 2y ago sa.Column("user_id", sa.Integer(), nullable=False),
298 cba9caa Dawsh 2y ago sa.Column("service_id", sa.Integer(), nullable=False),
299 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
300 cba9caa Dawsh 2y ago ["service_id"],
301 cba9caa Dawsh 2y ago ["services.id"],
302 cba9caa Dawsh 2y ago ),
303 cba9caa Dawsh 2y ago sa.ForeignKeyConstraint(
304 cba9caa Dawsh 2y ago ["user_id"],
305 cba9caa Dawsh 2y ago ["users.id"],
306 cba9caa Dawsh 2y ago ),
307 cba9caa Dawsh 2y ago sa.PrimaryKeyConstraint("user_id", "service_id"),
308 a47eb4c Dawsh 2y ago )
309 a47eb4c Dawsh 2y ago # ### end Alembic commands ###
310 a47eb4c Dawsh 2y ago
311 a47eb4c Dawsh 2y ago
312 a47eb4c Dawsh 2y ago def downgrade() -> None:
313 a47eb4c Dawsh 2y ago # ### commands auto generated by Alembic - please adjust! ###
314 cba9caa Dawsh 2y ago op.drop_table("users_services")
315 cba9caa Dawsh 2y ago op.drop_table("user_usage_logs")
316 cba9caa Dawsh 2y ago op.drop_table("notification_reminders")
317 cba9caa Dawsh 2y ago op.drop_table("node_user_usages")
318 cba9caa Dawsh 2y ago op.drop_table("inbounds_services")
319 cba9caa Dawsh 2y ago op.drop_table("hosts")
320 cba9caa Dawsh 2y ago op.drop_index(op.f("ix_users_username"), table_name="users")
321 cba9caa Dawsh 2y ago op.drop_table("users")
322 cba9caa Dawsh 2y ago op.drop_table("node_usages")
323 cba9caa Dawsh 2y ago op.drop_index(op.f("ix_inbounds_node_id"), table_name="inbounds")
324 cba9caa Dawsh 2y ago op.drop_table("inbounds")
325 cba9caa Dawsh 2y ago op.drop_table("tls")
326 cba9caa Dawsh 2y ago op.drop_table("system")
327 cba9caa Dawsh 2y ago op.drop_table("services")
328 cba9caa Dawsh 2y ago op.drop_table("nodes")
329 cba9caa Dawsh 2y ago op.drop_table("jwt")
330 cba9caa Dawsh 2y ago op.drop_index(op.f("ix_admins_username"), table_name="admins")
331 cba9caa Dawsh 2y ago op.drop_table("admins")
332 a47eb4c Dawsh 2y ago # ### end Alembic commands ###