11-- Seeding the User table
2- INSERT INTO " User" (telegram_id, username, first_name,role, warnings, approved_groups)
2+ INSERT INTO " User" (telegram_id, username, first_name,role, warnings, approved_groups,created_at,updated_at )
33VALUES
4- (111222333 , ' user1' ,' fuser1' ,' admin' , 0 , ARRAY[123456789 , 987654321 ]),
5- (444555666 , ' user2' , ' fuser2' ,' owner' , 2 , ARRAY[987654321 ]),
6- (777888999 , ' user3' ,' fuser3' ,' user' , 0 , ARRAY[123456789 ]),
7- (333444555 , ' user4' , ' fuser4' ,' user' , 1 , ARRAY[123456789 , 987654321 ]);
4+ (111222333 , ' user1' ,' fuser1' ,' admin' , 0 , ARRAY[123456789 , 987654321 ],NOW(),NOW() ),
5+ (444555666 , ' user2' , ' fuser2' ,' owner' , 2 , ARRAY[987654321 ],NOW(),NOW() ),
6+ (777888999 , ' user3' ,' fuser3' ,' user' , 0 , ARRAY[123456789 ],NOW(),NOW() ),
7+ (333444555 , ' user4' , ' fuser4' ,' user' , 1 , ARRAY[123456789 , 987654321 ],NOW(),NOW() );
88-- Seeding the Group table
9- INSERT INTO " Group" (group_id, group_name, rules, black_list, chat_permissions, updated_at, joined_at, approved_users, warnings, is_spam_time,members)
9+ INSERT INTO " Group" (group_id, group_name, black_list, chat_permissions, updated_at, joined_at, approved_users, warnings, is_spam_time,welcome_message ,members)
1010VALUES
11- (123456789 , ' Test Group 1' , ARRAY[' Rule 1 ' , ' Rule 2 ' ], ARRAY[ ' BadWord1' , ' BadWord2' ], ' {"can_post": true, "can_message": true}' , NOW(), NOW(), ARRAY[1 , 2 ], ARRAY[0 ], FALSE,ARRAY[0 ,2 ]),
12- (987654321 , ' Test Group 2' , ARRAY[' Rule A ' , ' Rule B ' ], ARRAY[ ' OffensiveUser1' ], ' {"can_post": false, "can_message": false}' , NOW(), NOW(), ARRAY[3 , 4 ], ARRAY[1 ], TRUE,ARRAY[3 ,4 ]);
11+ (123456789 , ' Test Group 1' , ARRAY[' BadWord1' , ' BadWord2' ], ' {"can_post": true, "can_message": true}' , NOW(), NOW(), ARRAY[1 , 2 ], ARRAY[0 ], FALSE, ' welcome message ' ,ARRAY[0 ,2 ]),
12+ (987654321 , ' Test Group 2' , ARRAY[' OffensiveUser1' ], ' {"can_post": false, "can_message": false}' , NOW(), NOW(), ARRAY[3 , 4 ], ARRAY[1 ], TRUE, ' welcome message2 ' ,ARRAY[3 ,4 ]);
1313-- Seeding the Warning table after Group data has been inserted
1414INSERT INTO " Warning" (user_id, group_id, warned_at, reason)
1515VALUES
1616 (1 , 1 , NOW(), ' Spamming' ),
1717 (2 , 2 , NOW(), ' Offensive behavior' );
18- -- Seeding the ApprovedUser table
19- INSERT INTO " ApprovedUser" (user_id, group_id, username)
20- VALUES
21- (1 , 1 , ' user1' ),
22- (2 , 2 , ' user2' );
23-
2418-- Seeding the Channel table
2519INSERT INTO " Channel" (name, channel_id, admins)
2620VALUES
2721 (' Test Channel 1' , 100010001 , ARRAY[1 , 2 ]),
2822 (' Test Channel 2' , 200020002 , ARRAY[3 , 4 ]);
29- -- Seeding the Blacklist table
30- INSERT INTO " Blacklist" (group_id, blacklisted_word, blacklisted_user_id)
31- VALUES
32- (1 , ' BadWord1' , NULL ),
33- (2 , ' OffensiveUser1' , 4 );
3423-- Seeding the GroupRule table
3524INSERT INTO " GroupRule" (group_id, rule_text, added_by)
3625VALUES
37- (1 , ' No spamming allowed' , 1 ),
38- (2 , ' Be respectful to others' , 2 );
39- -- Seeding the GroupMessageSettings table
40- INSERT INTO " GroupMessageSettings" (group_id, is_locked, welcome_message)
41- VALUES
42- (1 , FALSE, ' Welcome to the group!' ),
43- (2 , TRUE, ' Group is locked, no messages allowed' );
26+ (1 , ARRAY[' No spamming allowed' ], 1 ),
27+ (2 , ARRAY[' Be respectful to others' ], 2 );
0 commit comments