Last active
April 8, 2021 09:13
-
-
Save saviour123/e919302d9b0edf4a7a32 to your computer and use it in GitHub Desktop.
DB_Scripts
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
### MONGO | |
db.createUser({user: "mongo-admin", pwd: "password", roles:[{role: "root", db: "admin"}]}) | |
mongo -u dsals -p --authenticationDatabase dbname | |
### Create MYSWL User and grant the user ready only. | |
create user 'username'@'%' identified by ‘password‘; | |
grant select, show view on database_name.* to 'username'@'%' identified by 'password'; | |
### SQLSERVER | |
update AspNetUsers set IsDeleted=1 where email='superadmin@noodle.com' | |
update AspNetUsers set IsGoogleUser=1 where email='superadmin@noodle.com' | |
-- ALTER ROLE db_datareader add member jjanicelli; | |
-- CREATE LOGIN [jjanicelli] WITH PASSWORD = 'tr3s0n3tact1e'; | |
-- CREATE USER jjanicelli FROM LOGIN jjanicelli; | |
-- ALTER ROLE developers ADD MEMBER jjanicelli; | |
-- ALTER ROLE db_datawriter add member jjanicelli; | |
-- ALTER ROLE developers ADD MEMBER rganeshan; | |
-- ALTER ROLE db_datawriter add member rganeshan; | |
## use pgfutter to pump csv into postgres while creating tables in destination tables | |
for f in *; | |
do | |
if [[ $f = 'load.sh' ]] | |
then | |
echo "skipped $f" | |
fi | |
table_name=$(echo "$f" | cut -f 1 -d '.') | |
~/pgfutter_darwin_amd64 --db "ponde" --host "host_url" --port "5432" --user "root" --schema "public" --table $table_name --pw "<beautiful_password>" csv $f | |
echo $f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to find out the contents of your form if you don't understand what's going on behind the scene, you can try something like
Also by the way the name of your button is
button
notSUBMIT
, look at it again https://gist.github.com/saviour123/e919302d9b0edf4a7a32#file-mysimpleform-L23 and https://gist.github.com/saviour123/e919302d9b0edf4a7a32#file-mysimpleform-L40