Skip to content

Instantly share code, notes, and snippets.

View obelich's full-sized avatar
:octocat:
Aprendiendo Dart + Flutter

Oscar Miguel Amezcua Estrella obelich

:octocat:
Aprendiendo Dart + Flutter
View GitHub Profile
@obelich
obelich / rb
Created June 22, 2018 17:51
Elimina la llave foranea de una tabla
remove_foreign_key :$Table$, name: "$Fk_name$"
remove_index :$Table$, column: :$column_name$
remove_column :$Table$, :$column_name$, :integer
pg_restore -h localhost -U [User] -W -F t -d [BaseDatos] [Filename].tar
ERROR: Phusion Passenger doesn't seem to be running. If you are sure that it is running, then the causes of this problem could be:
1. You customized the instance registry directory using Apache's PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir option, or Phusion Passenger Standalone's --instance-registry-dir command line argument. If so, please set the environment variable PASSENGER_INSTANCE_REGISTRY_DIR to that directory and run passenger-status again.
2. The instance directory has been removed by an operating system background service. Please set a different instance registry directory using Apache's PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir option, or Phusion Passenger Standalone's --instance-registry-dir command line argument.
scp -r [user]@[domain]:[/directorypath/] [directorylocal]
bundle exec rake RAILS_ENV=production db:migrate
git config --global core.editor [editor]
DROP TABLE [nameTable];
DROP TABLE [nameTable];
\c [nombre]
rails destroy scaffold [nameScaffold]