add category seeder
This commit is contained in:
parent
d4eaf4f388
commit
e0440e8ab1
|
|
@ -62,6 +62,20 @@ def upgrade() -> None:
|
|||
false,
|
||||
NOW(),
|
||||
NOW()
|
||||
),
|
||||
(
|
||||
'01968b54-0000-7a67-bd10-975b8923b93e',
|
||||
'Lab AI',
|
||||
'Laboratorium Applied Informatics Polinema',
|
||||
NULL,
|
||||
Politeknik Negeri Malang,
|
||||
'0341404424',
|
||||
'labai@gmail.com',
|
||||
'http://labai.polinema.ac.id/homepage/',
|
||||
true,
|
||||
false,
|
||||
NOW(),
|
||||
NOW()
|
||||
)
|
||||
ON CONFLICT (id) DO NOTHING;
|
||||
""")
|
||||
|
|
@ -105,6 +119,25 @@ def upgrade() -> None:
|
|||
ON CONFLICT (username) DO NOTHING;
|
||||
""")
|
||||
|
||||
op.execute("""
|
||||
INSERT INTO public.categories(
|
||||
id, name, description, thumbnail, count_mapset, is_active, "order"
|
||||
) VALUES
|
||||
('019a0997-5b42-7c34-9ab8-35b4765ecb39', 'Batas Wilayah', 'Batas Wilayah', NULL, 0, true, 0),
|
||||
('0196c80b-e680-7dca-9b90-b5ebe65de70d', 'Kependudukan', 'Kependudukan', NULL, 0, true, 0),
|
||||
('0196c80c-855f-77f9-abd0-0c8a30b8c2f5', 'Lingkungan Hidup', 'Lingkungan Hidup', NULL, 0, true, 0),
|
||||
('0196c80c-f805-76a8-82c7-af50b794871b', 'Pemerintah Desa', 'Pemerintah Desa', NULL, 0, true, 0),
|
||||
('0196c80d-228d-7e1e-9116-78ba912b812c', 'Pendidikan', 'Pendidikan', NULL, 0, true, 0),
|
||||
('0196c80d-3f05-7750-ab2a-f58655fef6ea', 'Sosial', 'Sosial', NULL, 0, true, 0),
|
||||
('019936a6-4a5b-719f-8d88-d2df0af5aa20', 'Pendidikan SD', 'Pendidikan SD', NULL, 0, true, 0),
|
||||
('0196c80c-c4fc-7ea6-afc0-3672a1b44b5b', 'Pariwisata Kebudayaan', 'Pariwisata Kebudayaan', NULL, 0, true, 0),
|
||||
('0196c80c-61d8-7616-9abc-550a89283a57', 'Kesehatan', 'Kesehatan', NULL, 0, true, 0),
|
||||
('0196c809-a0b0-79fb-b597-422d716fdce8', 'Ekonomi', 'Ekonomi', NULL, 0, true, 0),
|
||||
('0196c80b-bb09-7424-9cd5-e3ec4946c7af', 'Kemiskinan', 'Kemiskinan', NULL, 0, true, 0),
|
||||
('0196c80b-8710-7577-bc28-3ce66a02f56f', 'Infrastruktur', 'Infrastruktur', NULL, 0, true, 0);
|
||||
ON CONFLICT (id) DO NOTHING;
|
||||
""")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# Delete in reverse order due to foreign key constraints
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user